Further Information

Examples of Pre-Exec and Post-Exec Commands for UNIX

Disk Image

Post-Exec: Mount

a Disk After the

Raw Volume

Backup

fi

#!/bin/sh

if [ $BDACC != 0] then

echo "Backup could not read the disk!"

echo "Disk will not be automatically mounted!" fi

echo "The disk will be now mounted!"

mount /dev/vg05/lvol2 /disk_with_many_files if [ $? = 0 ]

then

echo "Disk successfully mounted!" exit 0

else

echo "Failed to mount disk!" exit 1

fi

Filesystem Post-Exec: Log Backup for the Record

#!/bin/sh

if [ ! -f /etc/logfile ] then

/etc/logfile fi

echo "Backup finished with code $BDACC on " `date` >> /etc/logfile

#We do not want a backup to be marked failed even if the previous

action failed.

exit 0

A-22

Appendix A

Page 752
Image 752
HP B6960-90078 Disk Image Post-Exec Mount Disk After Raw Volume Backup, Filesystem Post-Exec Log Backup for the Record