Hello,
I am new to Unix and Solaris. I have a backup script that is
kicked off by the cron. The script is as follows:
mt -f /dev/rmt/0cbn rewind
ufsdump 0f /dev/rmt/0cbn /
ufsdump 0f /dev/rmt/0cbn /space
ufsdump 0f /dev/rmt/0cbn /data2
ksh /space/home/jnokes/bin/restorelog
mt -f /dev/rmt/0cbn rewind
mt -f /dev/rmt/0cbn offl
I just added the "ksh /space/home/jnokes/bin/restorelog" line. My
intent is to log all the files that were backed up. The restorelog
script is as follows:
#!ksh
# This script will log what files were backed up
for i in 1 2 3
do
LOGBASE=/data2/backuplog/backupPar_$i.log
LOG=$LOGBASE.$(date +%m%d)
ufsrestore tfs /dev/rmt/0 $i > $LOG
done
My question is how do I include the header for each dump in its log
file? We reuse our tapes and I want to make sure I am listing the
files that were backed up today and not displaying the files that were
backed up a week ago.
I am new to this so if I am going about this the wrong way I am open
to suggestions.
Thanks in advance.
John