Hi,
I run the following script on linux (we are running Open Suse 10.3)
and the backup log shows that all is backed up successfully (that is,
no error messages are seen). I was looking at the drive when it was
backing up and noticed the 'ready' light flashing (as I would expect
when it is writing to the tape) the whole time while the script was
running. But when I issue the command
tar tvf /dev/nst0 > tapelog_mthly.txt
to see what has been backed up on the tape, it only shows the first
directory (& sub-directories) has been backed up. Following is the
script I am using:
zebra:/usr/local/bin # more monthly_backup.ksh
#!/bin/ksh
#
#
# Monthly Backup Script
# -- Invoked Manually
#
# Author: Susie Leary --> derived from Mako Monthly backup written
# by Peter Eliades (17/06/04)
# Created: 02/10/2008
#
# Revisions:
# 03-10-2008 - SL --> added /usr/samba_shares/sysadmin
#
#
LogName=/usr/samba_shares/backuplogs/`date +"%A-%d-%m-%y"`_mthly.log
(set -A BackUpDirs
BackUpDirs[1]="/usr/samba_shares/marketing"
BackUpDirs[2]="/usr/samba_shares/development"
BackUpDirs[3]="/usr/samba_shares/production"
BackUpDirs[4]="/usr/samba_shares/bureau"
BackUpDirs[5]="/root/soap_usage_reports/hammerhead.tar.gz"
BackUpDirs[6]="/usr/samba_shares/sysadmin"
TapeDev=/dev/nst0 #Non-rewinding tape device
#Redirect stderr to stdout
exec 1>$LogName
exec 2>&1
print "Starting Monthly Backup at "`date`
mt -f $TapeDev rewind
if [[ $? -ne 0 ]]
then
print "Error!: mt returned $?"
fi
for dir in [EMAIL PROTECTED]
do
print "Starting Backup of $dir "`date`
tar cvf $TapeDev $dir
if [[ $? -ne 0 ]]
then
print "Error!: tar returned $? for $dir"
fi
print "Completed Backup of $dir "`date`
done
print "Completed Monthly Backup at "`date`
mt -f $TapeDev rewoffl)
#end
Is there something wrong with my script??
Any help appreciated.
Cheers,
SCL
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Computer Tech Support" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/computer-tech-support?hl=en
-~----------~----~----~----~------~----~------~--~---