[ubuntu-us-nm] How do you backup?

Leif Gregory ldgregory69 at gmail.com
Thu Apr 17 21:23:48 BST 2008


I've got a pocket sized external 250GB USB drive that I plug in every
few days to my linux boxes and run the below script. I've heard of
people doing rsync and other things, but I don't really know which is
best. 

Overall, I'm not really concerned with time as I plug the drive in, kick
off the script and go do something else. It's still pretty quick, maybe
15 or so minutes.

The only downside being the resulting tar is pretty big and I don't
know the command line options to pull just a single folder or file out
of it. 

I figured I'd just either extract the whole thing to a secondary drive,
or extract it to the original hard drive in the case of a full on
failure. I periodically do a test restore to a secondary drive just to
make sure it's viable. I also copy the USB drive to one of my desktops
periodically in case I ever lose the USB drive or it gets damaged.

#!/bin/sh
#Backup linux installation to external hard drive
sudo tar cvpzf "/media/WD Passport/laptop_backup.tgz" --exclude=/proc
--exclude=/lost+found --exclude=/mnt --exclude=/sys 
--exclude="/media/WD Passport" /

I've got a different filename for the backup on each machine script.
My preference really is to do a full backup each time rather than
messing with incrementals.

The restore script (for full on restores) does recreate the
directories I'm excluding from the backup. 

I realize that the tar is not encrypted, and I'm not overly concerned
with that. I have DriveCrypt volumes (part of the backup) which are
encrypted and contain all my sensitive info. If they want to look at
all my Hawaii and Mexico vacation pictures and read up on Power
Wagon technical specs from the unencrypted data, then they're welcome
to. <grin>

So, what are some better ways?

-- 
Leif Gregory
Power Wagon Registry:  http://powerwagonregistry.org
Truck Hacks:                http://trucks.PCWize.com
Geocaching:                    http://gps.PCWize.com
PHP Tutorials and snippets:    http://www.DevTek.org



More information about the ubuntu-us-nm mailing list