I just completed an important and long-neglected task: The backups for my webserver have been reinvented and improved. This isn’t to say I haven’t been making backups previously, mind you! I had a (somewhat) cumbersome system of weekly tarballs and nightly rsync-over-ssh jobs going on. It was a bit I/O intensive, though. The opposite of efficiency.
The new system consists of:
- My home QNAP with the rsync app.
- My home firewall configured to route rsync traffic to the QNAP, but only from my webserver’s IP address. (There’s still a good username/password involved as well.)
- A group of organized, nested target directories on the QNAP.
- A string of rsync commands in a nightly cron job script which update the QNAP’s copy of each of the websites, each email account’s mail store, the website database dumps and a few key configuration directories out of /etc.
This setup should cut down on disk I/O on the webserver as well as nightly transfer rates. (I look forward to not seeing any more Sunday morning “hey, we noticed that your disk I/O is higher than normal” alert emails from the fine folks at Linode, if nothing else.) Note that this backup scheme is in addition to Linode’s nightly server snapshots for disaster recovery.
I configured the IP address for our home as a ‘hosts’ file entry, so when (inevitably) Frontier changes it on us, all I have to do to fix the backup job is to update that entry appropriately. (A near-future project: Detecting and alerting on communication errors in the backup script…)
Next up? A bunch of software upgrades and migrations, particularly now that the Gallery Project has shut down. D’oh!