Automatic weekly forum backups
Moderator: Erik Mortis
- Ari Rahikkala
- Posts: 4326
- Joined: Sun Jan 21, 2001 12:56 pm
- Contact:
Automatic weekly forum backups
... should be working now. Maybe. Ask me again in a week
.
No-one should be without a parasol, Sirocco.
- Nick Foghorn Leghorn
- Posts: 843
- Joined: Thu Aug 25, 2005 6:25 pm
- Location: County of Norfolk
- Contact:
Re: Automatic weekly forum backups
How?
Just curious, planning on implementing a periodic backup system on another MySQL based system, and wanting to compare notes.
Delphi Augustus used to have a backup on the server, plus have a copy emailed to him. The Republic used to do manual backups whenever the steward (read: I) felt like it, and I think I found a PHP script that runs every time index.php is viewed and does it to a "backup" directory as long as its a certain time after the last one, a variable stored in a text file.
Just curious, planning on implementing a periodic backup system on another MySQL based system, and wanting to compare notes.
Delphi Augustus used to have a backup on the server, plus have a copy emailed to him. The Republic used to do manual backups whenever the steward (read: I) felt like it, and I think I found a PHP script that runs every time index.php is viewed and does it to a "backup" directory as long as its a certain time after the last one, a variable stored in a text file.
Count of Norfolk
- Ari Rahikkala
- Posts: 4326
- Joined: Sun Jan 21, 2001 12:56 pm
- Contact:
Re: Automatic weekly forum backups
By putting this in my crontab (actually, of a separate user account I set up only for backup duty), after setting up private key authentication:
@ 1w ssh shire@shireroth.kuroshiro.net "mysqldump shire_db --single-transaction -q -u shire_dbuser -p<our database password> | bzip2 -c" > shireroth-"$(date -u)".sql.bz2
@ 1w ssh shire@shireroth.kuroshiro.net "mysqldump shire_db --single-transaction -q -u shire_dbuser -p<our database password> | bzip2 -c" > shireroth-"$(date -u)".sql.bz2
No-one should be without a parasol, Sirocco.
- Ari Rahikkala
- Posts: 4326
- Joined: Sun Jan 21, 2001 12:56 pm
- Contact:
Re: Automatic weekly forum backups
Ok, the database dump for last wednesday has been created as it should, and seems to be complete (at a quick glance)... we have automatic off-site backups!
No-one should be without a parasol, Sirocco.
- Nick Foghorn Leghorn
- Posts: 843
- Joined: Thu Aug 25, 2005 6:25 pm
- Location: County of Norfolk
- Contact:
Re: Automatic weekly forum backups
About goddamned time. Now where did I put my copy of Goldeneye...
Count of Norfolk
-
dr-spangle
- Posts: 344
- Joined: Fri Dec 22, 2006 11:47 am
- Contact:
Re: Automatic weekly forum backups
It'ld be handy for me to be able to implement something like that for MCS, currently I just back it up every month or so in case Pete loses another domain I could have it all backed up and then temp running somewhere...
But I doubt it would be possible to set something like that up to backup the whole site files, databases and all every week or so without it eating bandwidth of someone.
But I doubt it would be possible to set something like that up to backup the whole site files, databases and all every week or so without it eating bandwidth of someone.
- Ari Rahikkala
- Posts: 4326
- Joined: Sun Jan 21, 2001 12:56 pm
- Contact:
Re: Automatic weekly forum backups
The latest backup weighs ~30 megabytes. 30 megabytes once a week is very little, but then again on the other hand the server apparently does have rsync, so I could try increasing the efficiency of the backups with that (and documenting how to do it so others can do it)... I'm not sure how much rsync would help with SQL dumps, though, especially since it certainly would *not* help if the dumps were compressed first.
No-one should be without a parasol, Sirocco.
Who is online
Users browsing this forum: No registered users and 3 guests