Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
Backup strategies? Feature Requests
By janra , Section Help! []
Posted on Sun Dec 02, 2001 at 12:00:00 PM PST

I'm bad. I haven't backed up my scoop db in over a year. (actually, I've never backed it up!)

Is there a way to have scoop actually do its own backups, via (say) the cron interface? If not, some information about how to back up and restore the database would be nice to have included with the scoop docs, for mysql newbies like me. (yes, despite the fact that I've been running scoop for over a year, I still know very little about mysql.)

(This was prompted mostly by k5's extended downtime, and partly by the fact that I've actually gotten a couple of active members now and I don't want to lose their stuff.)

< Smart Searching | New Scoop Features >

Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Login
Make a new account
Username:
Password:

Related Links
· Scoop
· More on Feature Requests
· Also by janra

Story Views
  67 Scoop users have viewed this story.

Display: Sort:
Backup strategies? | 10 comments (10 topical, 0 hidden)
mysqldump (none / 0) (#1)
by hurstdog on Mon Dec 03, 2001 at 12:02:04 PM PST

Its the easiest way to do backups. Just set up a cron job (we could write one that would run in scoop, that might be nice, with a var for where to backup the db to... mmm... I'll write that one down.

To use mysqldump to backup the db:

prompt$ mysqldump -u scoopuser -p scoopdb > scoopdbbackup.sql
Password: <shh!>
...
prompt$
And thats it! Wouldn't be hard to write a little cron for that, at all.

Regarding a backup scoop cron: I think a var would be really handy that could be keep_snapshot_every and have values similar to the cron stuff, 1d, 1w, 1y, etc. Then the cron would do a full backup every night (or every time its set to run) and keep a snapshot every week. For the nightly backups, they would get deleted one week later, to save space. That way, you'd have nightly backup for a week, and keep_snapshot_every timeframe backups for as long as you've been running cron. Sound like a good idea? oooh. Another var, compress_backups! I really like this idea. Hear hear janra!



-hurstdog


mysqldump is nice. Use mysqlhotcopy. It's better (5.00 / 1) (#8)
by hillct on Wed Dec 05, 2001 at 06:57:36 AM PST

While mysqldump is suitable for grabbing images of the SB when you choose to do a backup, the mySQL distribution comes with a script 'mysqlhotcopy' which does several good things. First, it locks all thetables in the DB it's backing up, FLUSHes the data, copies the DB files, then starts the log file fresh, unlocks the tables and finishes.

This is important when implementing a serious system backup strategy because while you can't backup the active DB data directory without running the risk of currupting the data, mysqlhotcopy allow you to copy the files of one or more active databases to a location suitable for being backed up using your favorite system backup strategy (I favor Veritas NetBackup but any will do).

--CTH



--
ScoopHost.com - Premier Scoop Hosting and custom development from the lead developers.


Well, I sent in a preliminary patch to scoop-dev (none / 0) (#9)
by Captain_Tenille on Wed Dec 05, 2001 at 03:38:00 PM PST

It's just preliminary, seeing as I haven't had a chance to test it out yet, and it's mainly a mysqldump with some other stuff, like making weekly snapshots and daily backups, deleting the dailies that are more than a week old, and compressing them. If anyone who's not on scoop-dev is interested in seeing it, let me know and I'll post it here.

---------------
/* You are not expected to understand this. */


Backup strategies? | 10 comments (10 topical, 0 hidden)
Display: Sort:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search