Monday, 28 August 2006

How to do Linux backups

My "professional OS of choice" is Solaris for most tasks, and the standard method for filesystem backup is ufsdump.

Linux is a bit of a different story, with Linus Torvalds once saying that dump is deprecated. The main problem of dumping a mounted read/write filesystem is that the contents can change during the backup and the dump program has no knowledge of what is currently in the disk cache.

Hmm, what to do then... Maybe tar or [cringe] cpio?

The method I've used and prefer is to still use dump, but to take advantage of LVM snapshots to provide consistency. I've got this working with Ext3 with no problems, but my main Suse 10.1 install is having problems taking snapshots consistently. I am managing to take normal xfsdumps of my [mostly] idle filesystems which are written out to external firewire drive.

Backups are one of those things we all agree is a good idea, but most of us fail to put into practice (for our personal machines anyway). Having a dump of a filesystem on an external disk gives a little peace of mind.

No comments: