Saturday, 3 March 2007

Backup using dump

Following up on my earlier post today about setting up my USB backup drive, here are some pointers to using dump and restore to back up my whole file system. All the information is in this how-to. While dump should be able to run with the whole system online, to make life easier for it and since I don't have anything running that has to stay up, I dropped into single user mode (init 1). Then
dump -0uf /media/usbdisk/{insert/filename} /
restore -C -f /media/usbdisk/
makes a full backup of the file system into the specified file (in this case mounted on /media/usbdisk), and tests it afterwards (that's what restore -C does). In my case, a roughly 6.5G backup took 12 minutes to complete (over USB2.0) - I didn't keep track of the test time.

Of course, for single-file or -directory backups, you need something else. I haven't completely settled on a structural solution, at the moment I'm using a mix of rsync (to save to a network drive) and bzr (to keep revisions of my work without need for a server).

With thanks to our very knowledgeable Computer Officer at work for pointing me to dump.

No comments: