[ale] full system backups

linuxhat at mailandnews.com linuxhat at mailandnews.com
Thu Aug 12 09:39:11 EDT 1999


About doing full system backups, good ole GNU tar will do it just fine.
This is particularly useful with a rescue root diskette that contains tar(1)
and the appropriate drivers for your backup device.... then you can just
slurp everything back into place, rerun lilo (which will be included in the
backup (you hope :), and kabam, you're back in business.  Read man tar(1) 
for all the juicy details, including incremental backups, volume management, 
and all the things you never suspected plain old tar(1berkeley) could do... 
this is not your father's tape archive program.  I used it professionally
for four years @eas.gatech.edu with little more than some script wrappers...
worked beautifully.  (of course, unfortunately AIX didn't have a way to 
boot to ramdisk and then enter a maintenance shell, so we had to reinstall
the OS first, then use tar -tv to figure out what had changed on the
system.... <sigh>  But this will work much better under Linux...)  

Backup should look something like

tar -cvlf /dev/tapedriven / #the "l" means stay in /, don't travel mounts
tar -cvlf /dev/tapedriven /usr # make sure to use no-rewind devices
#yadda yadda yadda .. note that you can go remote, like
tar -cvlf backupmachine:/dev/itstape /home

Then restore would look like
LILO boot: rescue
yadda yadda yadda swap for rescue floppy yadda
(hmm, fdisk could be useful here too) (once that and mke2fs are done...)
# mount /dev/hda1 /mnt
# mount /dev/hda3 /mnt/usr
# cd /mnt
# tar -xv --preserve -f /dev/tapedriven # no lead /'s preserved, so drops 
# tar -xv --preserve -f /dev/tapedriven # into place; --preserve keeps perms
yadda yadda, although at this point you may want to just go on and
restore the other fs's after you're in a normal system
# lilo -r /mnt #fix mbr
# cd /
# umount /mnt/usr
# umount /mnt
<exit>

In summary: thanks to Linux' keeping most things in normal files, and the
way lilo works, you don't bloody need anything special to restore a system. 
You can GET special stuff, but why bother?  This is simple, straightfoward,
and you can put enough scripting around it (like the aforementioned volume
stuff that's part of gtar) to effectively manage things without resorting
to payware.  (Hell, a little tcl/tk around a setup not much more complicated
than this and you could write an app you *could* sell in a couple of
weeks.... "backup for dummies", anyone? :) (goodness knows everyone needs
more backups.... including me!)

-- Glenn






More information about the Ale mailing list