LJ Archive

Listing 1. Save.metadata Script

# Back up the entire system to Charlesc's drive.<\n>
# To make this work, we
# need a convenient chunk of disk space on charlesc
# we can mount as /mnt/save.

save="/mnt/save

# so we don't back up CD-ROMS
umount /mnt/cdrom

# Make sure it's there
umount $save
mount $save

rm $save/tester.tar.old.gz
mv $save/tester.tar.gz $save/tester.tar.old.gz

cd /

# back up RPM metadata

rpm -Va > /etc/rpmVa.txt

# save everything except /mnt and /proc.

time tar cf - / --exclude /mnt
--exclude /proc --exclude
/home/save | gzip -c > $save/tester.tar.gz

mount /mnt/cdrom
LJ Archive