Disk to disk copies
Don't even know my real name!
matt at oddjob.UChicago.EDU
Fri May 6 00:57:15 AEST 1988
haynes at ucscc.UCSC.EDU (Jim Haynes) writes:
) We have a habit of copying the root to a spare partition
) every night [with dd] ...
I sya, the way to back up your root partition is with rdist. After
all, the root and swap areas or compiled in to a configured vmunix,
so you don't want the backup drive's vmunix (nor /etc/fstab) to be
identical to the primary drives. I do a nightly:
================ from /usr/adm/daily:
if [ -d /backuproot/lost+found ]; then
echo "Running rdist:"
date >> /usr/adm/rdist-errs
rdist -f /usr/local/lib/Distfile backuproot 2>&1 | \
tee -a /usr/adm/rdist-errs
else
if [ -d /bentuproot/lost+found ]; then
echo "Running reverse rdist:"
date >> /usr/adm/rdist-errs
rdist -f /usr/local/lib/Distfile reversebackup 2>&1 | \
tee -a /usr/adm/rdist-errs
else
echo "/backuproot not mounted -- skipping rdist"
fi
fi
================
Either the backup root partition is mounted on /backuproot or, if we
are running on the backup root, the primary root is mounted on
/bentuproot (if mounted at all).
================ /usr/local/lib/Distfile:
ROOTFILES = ( /.cshrc /.login /.plan /.profile /.rhosts /PhoneNumbers /Rates
/bin /boot /private /etc /kadb /lib
/mbox /stand /sys /tftpboot /genvmunix /vmunix* )
# It's a pity we can't rdist /dev !
EXROOT = ( /vmunix /etc/fstab /etc/rc.dump )
ROOTSPECIAL = ( /vmunix.xy2 )
ETCSPECIAL = ( /etc/fstab.xy2 /etc/rc.dump.xy2 )
backuproot:
${ROOTFILES} -> oddjob
install -w -R /backuproot ;
except ${EXROOT} ;
special ${ROOTSPECIAL} "name=/backuproot/`basename $FILE .xy2` ;
rm $name; ln $name.xy2 $name";
special ${ETCSPECIAL} "name=/backuproot/etc/`basename $FILE .xy2` ;
rm $name; ln $name.xy2 $name";
REVROOTSPECIAL = ( /vmunix.xy0 )
REVETCSPECIAL = ( /etc/fstab.xy0 /etc/rc.dump.xy0 )
reversebackup:
${ROOTFILES} -> oddjob
install -w -R /bentuproot ;
except ${EXROOT} ;
special ${REVROOTSPECIAL} "name=/bentuproot/`basename $FILE .xy0` ;
rm $name; ln $name.xy0 $name";
special ${REVETCSPECIAL} "name=/bentuproot/etc/`basename $FILE .xy0` ;
rm $name; ln $name.xy0 $name";
================
Matt Crawford
More information about the Comp.unix.wizards
mailing list