As a couple of my favorite bloggers recently suffered a total data loss on their server and they had no reliable backup plan, I thought someone would be interested in how we do backups for the ScrewTurn website.
For a starter, the SVN repository is hosted at Unfuddle. svn.screwturn.eu is just a read-only mirror.
The backup is done this way, daily, via a set of batch scripts:
- a comprehensive backup of the MySQL database (used for phpBB and WordPress) is generated using the integrated scheduler
- the database backup file and all the other data (websites, SVN repository, etc.) is packed in a ZIP file
- the ZIP file is downloaded via FTP from a remote machine; the latter runs in Italy while the server runs in New Jersey, USA.
The most important part: how can we make sure that the backup works? Because we used it to migrate the site to a new server, and it works. The backup is all-inclusive: even scheduled tasks are backed up. The only thing that is not included is the IIS metabase, but for that I have a copy stored on my PC (also backed up daily).
Trivia:
- daily backups are preserved for an entire month offsite and for a week on the server, in case we need to restore something that’s been accidentally deleted (or hacked)
- the ZIP file containing the backup is roughly 465 MB, growing 1.5 Mb a day
- backups take up to 25% of our daily network traffic.
I’m personally a bit paranoid about backups, but I think they’re worth the time and money spent.
Bottom line: in case the whole datacenter blows up, we would only lose a day worth of data, which consists of a dozen forum posts, on average. All the other data is either a copy itself (SVN) or does not change very frequently (content of the wiki, the blog).