Help with ADSM & Unix shell scripting
1996-10-18 15:25:12
=20
All,
=20
=20
I am attempting to convert historical backups from Epoch to ADSM. I seem t=
o be=20
having some problems with looping in the bourne shell with ADSM. Could som=
eone=20
with some experience writing unix/adsm shell scripts please explain why t=
he=20
loop works with the dsm archive commented out, but fails with it included?
=20
ALL HELP IS APPRECIATED!! Thanks
=20
----- this is a section of the script being run (#!/bin/sh) -------------=
-----
** Note: some of the line spacing is messed due to cutting & pasting
** Note: some of the line spacing is messed due to cutting & pasting
=20
=20
while read FILESYSTEM
do
=20
echo "Starting recovery of $FILESYSTEM from date $RECOVERYDATE from E=
poch=20
system" >>/tmp/backup_conversion_status_for_$LOGDATE
echo `date` >>/tmp/backup_conversion_status_for_$LOGDATE
=20
/usr/epoch/bin/ebcrecover -c zeus -D zeus -d '/zeus/d10/' -o never \
-w zeus_monthly_workitem -T $RECOVERYDATE \
-t zeus_monthly_backup_template $FILESYSTEM\/\* >>=20
/tmp/backup_conversion_status_for_$LOGDATE 2>&1
=20
## NOTE: THE ABOVE SECTION IS THE RECOVERY PROCESS ##
## THIS WORKS FINE!! ##
=20
if [ $? =3D 0 ]
then
=20
echo "Starting ADSM archive of $FILESYSTEM from date $RECOVERYD=
ATE"=20
>>/tmp/backup_conversion_status_for_$LOGDATE
=20
dsmc arch -SUBdir=3Dyes -DELETEFILEs -archm=3Dapl_monthly =20
-description=3D"$ARCHIVE_DESCRIPTION for filesystem /zeus/d10$FILESYSTEM d=
ate=20
$RECOVERYDATE" /zeus/d10$FILESYSTEM/\* >>=20
/tmp/backup_conversion_status_for_$LOGDATE 2>&1
=20
echo `date` >>/tmp/backup_conversion_status_for_$LOGDATE
=20
else
=20
echo "It appears that the Epoch restore has failed"=20
>>/tmp/backup_conversion_status_for_$LOGDATE
exit 1
=20
fi
=20
done
=20
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- Help with ADSM & Unix shell scripting,
Tom McKnerney <=
|
|
|