On Sunday 01 Jun 2003 01:15, Jason Calabrese wrote: > #! /bin/bash > ####################### > # Backup Script > ####################### > > mount /boot -o ro > mount /mnt/backup > > FILE=/mnt/backup/`date +"%Y-%m-%d"`.tar > FILE_LIST=/mnt/backup/`date +"%Y-%m-%d"`.list > OLD_FILE=/mnt/backup/`date --date='3 days ago' +"%Y-%m-%d"`.tar > OLD_FILE_LIST=/mnt/backup/`date --date='3 days ago' +"%Y-%m-%d"`.list > EXCLUDE='--exclude /proc --exclude /mnt --exclude > /usr/portage/distfiles' > > tar -cpvvf $FILE / $EXCLUDE > $FILE_LIST > > rm -f $OLD_FILE > rm -f $OLD_FILE_LIST > > umount /boot > umount /mnt/backup > > hdparm -y /dev/hdb
Hi Jason,
I like your script, but have one reservation. It seems ideal to completely restore, for example, yesterday's backup; but with such a big tarball it will be very difficult to restore one or two small files. I do something similar on many smaller chunks of the filesystem.
It's not difficult to restore one or two files. Doing a --list with some grep magic would get you the name of the files (if you dont remember them), then you could extract those two files specifically.
The only problem I see is using such large tarballs. A whole system tarball could be rather bulky, and storing full systems for multiple machines could likewise be a problem.
For home machines i would reccommend not backing up *everything*. downtime isnt a huge issue for most home computers (especially since the person in question has four), but storage is (he said he wanted to burn to cd). What I usually do is rather than back up everything excluding certain places, I only back up what needs to be backed up. Usually you should be fine backing up /etc and /home, and rebuilding the rest of the system.
I have toyed with the idea of full backups every other week, and incrimental backups every few days, keeping the last full backup and all incrimentals since. Right now I'm working on a partner-based backup script along these lines using ssh and rsync. Don't hold your breath for me to show anyone, I'm taking my time writing it. There are projects out there however that do this, though I cannot remember their names.
Essentially, you ("you" being Ryan, not neccessarily Peter) would need to figure out what works best for you, based on how much storage space you have availiable, how fast the machines are (if you were to back up the whole system, I'm sure 'tar cz' would take quite a while on slower machines...) and how much time you have to do it (...but thats not really an issue at 2am)
As for the windows machine, i cannot really suggest anything.
-Chris I
I fill MY industrial waste containers with old copies of the "WATCHTOWER"
and then add HAWAIIAN PUNCH to the top ... They look NICE in the yard ...
pgp00000.pgp
Description: PGP signature
