building dump/restore

Adam Myrow amyrow at midsouth.rr.com
Fri Nov 7 21:11:43 EST 2003


You can designate who the owner of the man page and such is at build time
with various options to configure.  I always made it root, since that's
how all other software does it.  As far as I'm concerned, it's just a bad
default.  Oh, I also selected to build a statically linked version and
when it was built, copied restore to a floppy disk formatted as EXT2.
That way, I can restore my system from a boot disk without worrying about
library dependencies.  If you do build a statically linked version at any
time, be sure and strip it with the "strip" command so that it will be as
small as possible.  I suggest stripping all binaries unless you are
debugging the code, and think more make files should do this by default.
It can make a huge difference in file size especially with C++ programs.

BTW, here's a script I use to make a full backup once a week and
incremental backups daily.  Since I am backing up to an old 2GB hard drive
mounted on /backup, I use compression.  This slows the dump down a lot,
but is necessary when space is tight.  I have two partitions.  I have my
root partition and /home, so this backs them both up.  What you end up
with at the end of a week is a full backup from Sunday, and incrementals
for each day of the week so you can restore to a particular point in time.
The script clears out the old backups before making a new full backup.
Feel free to modify it and use it as you please.

#!/bin/sh
#Backup 1.2 by Adam Myrow.
#This script performs a dump whose level is based on the day of the week.
#It does a full backup if it's Sunday, and incremental backups all other days.
#Changed to use the absolute path of dump on 10/12/03.
#It appears as though something changed in crond, and it's not documented
#anywhere that I can find.
week_day=`date +%w`
if [ $week_day -eq 0 ]; then
	rm -f /backup/slack* /backup/home*
fi
/usr/local/sbin/dump $week_day -uz9 -f /backup/slackware-$week_day /
/usr/local/sbin/dump $week_day -uz9 -f /backup/home-$week_day /home
#End of backup 1.2.




More information about the Speakup mailing list