Fog Creek Software
Discussion Board

Server backup strategy?

We're currently reevaluating our backup strategy(ies), and I'm wondering what other folks' approaches are.  Specifically, I'm wondering what is considered worth backing up on a small public webserver.  Here's what we back up now:

- full dump of our database (includes customer records, forum contents, etc.)
- contents of /var/log/www/ (so we can reconstitute our web usage stats historically)
- our firewall config script

There's huge amounts of configuration files that we could backup.  There's, httpd.conf, etc.  What I'm wondering is, is it worth it to back such things up?  If our production web box dies, and we need to set up sendmail et al., it seems like it would be more trouble than it's worth to try to retrofit backed-up config files to a fresh install.  Then there's our web application server, but that can be recreated automagically from cvs.

Any other ideas for worthwhile things to back up?  (Keep in mind, this is a public server, so we don't need to deal with cvs, network shares, etc.)

Wednesday, March 12, 2003

The strategy that I'm currently using is based on this:

What you do is get another machine that has nothing but a big IDE drive (I'll call it the "backup machine").  Then create a read-only rsync server on the server that is only accessible from the backup machine.  The backup machine uses rsync to get a copy of all files that have changed on the server since the last backup.  By doing a "cp -al" first, as described in the linked page, you can keep several snapshots of all the files on your server.  These snapshots are then served back to the server using a read-only NFS share.

If you accidentally delete or change a file, you can get it back from any of several backups instantly.  If the whole machine dies, you plug in a new machine, drop a rescue disk it the cd drive, and "cp -a" backup your entire installation.  If  someone hacks your web server, they can't get write access to the backup machine, so your backups are safe.

To do offsite backups, put the backup machine on the other side of a network (slower), or get a external firewire IDE box (or any other backup medium that you want) and rsync it off the latest snapshot on the backup machine.

Tim Evans
Wednesday, March 12, 2003

Full backup of all files daily. Costs more, but worth it if the server is compromised, or an important file deleted, or something else of that kind.

On a regular basis you should also do a full restore to another server type box - if you can't easily get the service provided by that server back running within a certain length of time (depends on your needs so you need to plan and set this yourself). If this happens you need to consider this a show stopping bug in your web service provision and do a review of current process to see what is going wrong.

Robert Moir
Wednesday, March 12, 2003

*  Recent Topics

*  Fog Creek Home