Problem with my shell wrapper
2003-10-14 15:15:19
*Hi,
I am using shell wrapper to run my pre- and post- backup scripts.
However, when Amanda runs my new dump script, I get such
error message.
*
FAILURE AND STRANGE DUMP SUMMARY:
mymachine /dev/sda11 lev 0 STRANGE
so I looked through the log file, and the log said:
#################################################################
STRANGE dumper mymachine /dev/sda11 0 [sec 1200.303 kb 12809830 kps
10672.2 orig-kb 12809830]
sendbackup: start [mymachine:/dev/sda11 level 0]
sendbackup: info BACKUP=/sbin/dump
sendbackup: info RECOVER_CMD=/sbin/restore -f... -
sendbackup: info end
| DUMP: Date of this level 0 dump: Tue Oct 14 01:44:02 2003
| DUMP: Dumping /dev/sda11 (/d01) to standard output
| DUMP: Added inode 8 to exclude list (journal inode)
| DUMP: Added inode 7 to exclude list (resize inode)
| DUMP: Label: /d01
| DUMP: mapping (Pass I) [regular files]
| DUMP: mapping (Pass II) [directories]
| DUMP: estimated 12797400 tape blocks.
| DUMP: Volume 1 started with block 1 at: Tue Oct 14 01:44:21 2003
| DUMP: dumping (Pass III) [directories]
| DUMP: dumping (Pass IV) [regular files]
| DUMP: 24.46% done at 10433 kB/s, finished in 0:15
| DUMP: 50.42% done at 10753 kB/s, finished in 0:09
| DUMP: 76.18% done at 10832 kB/s, finished in 0:04
| DUMP: Volume 1 completed at: Tue Oct 14 02:04:00 2003
| DUMP: Volume 1 12809830 tape blocks (12509.60MB)
| DUMP: Volume 1 took 0:19:39
| DUMP: Volume 1 transfer rate: 10864 kB/s
| DUMP: 12809830 tape blocks (12509.60MB)
| DUMP: finished in 1179 seconds, throughput 10864 kBytes/sec
| DUMP: Date of this level 0 dump: Tue Oct 14 01:44:02 2003
| DUMP: Date this dump completed: Tue Oct 14 02:04:00 2003
| DUMP: Average transfer rate: 10864 kB/s
| DUMP: DUMP IS DONE
sendbackup: size 12809830
sendbackup: end
#####################################################
*Is there anything wrong with my wrapped dump script or I cannot wrap
the dump script at all? My wrapped dump script is attached
below.
Thanks
Kin-Ho Kwan
My wrapped dump script
#####################################################
# PATH for the Original dump
RealDump="/usr/local/sbin/dump"
# The file system you want to dump
DumpedFileSystem=$4
# The Oracle directory
ORACLE="/dev/sda10"
# The "d01" direcotry
D01="/dev/sda11"
# Log File
LOG="/tmp/amanda_log"
if [ $1 == "1Ssf" ]; then
echo "DUMPING $@" >> $LOG
# If amanda start dumping Oracle, then
# set Oracle into backup mode
if [ $DumpedFileSystem == $ORACLE ]; then
echo "`date` Backuping up Oracle Data " >> $LOG
sudo /start_backup.sh
$RealDump "$@"
ReturnCode=$?
echo "`date` Done backuping up backup files" >> $LOG
exit ${ReturnCode}
# set Oracle into normal mode after Oracle is dumped.
elif [ $DumpedFileSystem == $D01 ]; then
echo "`date` Backuping Oracle Data File" >> "$LOG"
$RealDump "$@"
ReturnCode=$?
echo "`date` Oracle Data backed up " >> "$LOG"
# Restore Normal Mode
else
echo "`date` Backing up $DumpedFileSystem " >> "$LOG"
$RealDump "$@"
ReturnCode=$?
fi
else
$RealDump "$@"
ReturnCode=$?
fi
if [ $DumpedFileSystem == $D01 ]; then
echo "`date` Restoring instance into non-backup mode" >> "$LOG"
sudo /finish_backup.sh
echo "Done" >> "$LOG"
exit ${ReturnCode}
fi
exit ${ReturnCode}
################################################
*
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Problem with my shell wrapper,
Kin-Ho Kwan <=
|
|
|