copying "a" partitions

Frederick M. Avolio avolio at decuac.DEC.COM
Tue Mar 20 07:16:10 AEST 1990


We use a shell script executed out of crontab.  Uses dump.  Doesn't require
operator intervention.

Fred
--------------
0 18 * * * /usr/adm/manager/rootbkup

/usr/adm/manager/rootbkup is:

#!/bin/sh
# back up root to spare partition nightly -- avolio
#
mount /dev/ra7a /bck
if test $? -ne 0
then
	echo problem mounting ra7a -- rootbkup not done| mail manager
	exit 1
fi
umount /dev/ra7a
newfs /dev/rra7a ra81
if test $? -ne 0
then
	echo newfs /dev/rra7a ra81 failed in rootbkup | mail manager
	exit 2
fi
mount /dev/ra7a /bck
if test $? -ne 0
then
	echo mount of /dev/ra7a after newfs failed in rootbkup | mail manager
	exit 3
fi
cd /
dump 0uf - / | (cd /bck ; restore xf -)		>/dev/console
cd /
umount /dev/ra7a
echo Auto-dump of root to bck done `date` |tee -a /usr/adm/opslog >/dev/console
exit



More information about the Comp.unix.ultrix mailing list