Cover V02, I04
Article
Figure 1
Figure 2
Figure 3
Figure 4
Listing 1
Listing 2
Listing 3
Listing 4
Listing 5
Sidebar 1

jul93.tar


Listing 4: incrbak.sh

#
# incrbak.sh:
#   Make incremental backup of a filesystem.
#   Place in currently selected dataset.
#
# usage: incrbak.sh <filesystem>
# examples:
#       incrbak.sh u1
#       incrbak.sh u3
#

ROOT=/
CTARDIR=/u3/Backup/Logs; export CTARDIR
OPTIONS=c8VIP
TMPDIR=/u5/dumpdir;export TMPDIR
ADMIN=admin                 # user/alias to send mail to in case of error

[ $# -ne 1 ] && echo "usage: $0 <filesystem>" && exit 1
cd $ROOT

if [ $1 != root ]; then
cd $1
ctar $OPTIONS .
else
ctar ${OPTIONS}EEEEEEE ./u ./u1 ./u2 ./u3 ./u4 ./u5 ./mnt .
fi

if [ $? -ne 0 ]; then
/usr/bin/mail -s "ctar error" $ADMIN <<END
There was an error in incremental backups. Please check the log file
(it is /u3/Backup/Logs/Last_Incr).
END
fi