I currently have, other than rootvg, three volume groups on my system that I wish to save daily with one backup process.
I have written a script that has been working successfully, but when I look at the data saved onto the tape, I can only find the last volume group's information. This suggests to me that the volume group that is last saved has been written over the previous two.
Can anybody please advise me how to perform these saves in a script that will append onto one tape.
Here is an sample from my existing script...
TAPE1=/dev/rmt1
NOREWIND0=/dev/rmt0.1
NOREWIND1=/dev/rmt1.1
daily_bkup()
{
echo "*************************************************************************" >> $logfile
echo "SAVEVG of volume groups USERVG1, USERVG2 & USERVG3 started AT `date`" >> $logfile
echo "*************************************************************************" >> $logfile
echo "" >> $logfile
for vg in uservg1 uservg2 uservg3
do
./usr/bin/savevg -f $NOREWIND1 '-i' '-m' '-X' $vg
done
if [ $? -eq 0 ]
then
echo "*************************************************************************" >> $logfile
echo "SUCCESS: Volume Group Backups completed successfully at `date +%H:%M`" >> $logfile
echo "*************************************************************************" >> $logfile
echo "" >> $logfile
else
echo "*************************************************************************************" >> $logfile
echo "FAIL: Volume Group Backups Failed at `date`" >> $logfile
echo "*************************************************************************************" >> $logfile
echo "" >> $logfile
fi
}
I have written a script that has been working successfully, but when I look at the data saved onto the tape, I can only find the last volume group's information. This suggests to me that the volume group that is last saved has been written over the previous two.
Can anybody please advise me how to perform these saves in a script that will append onto one tape.
Here is an sample from my existing script...
TAPE1=/dev/rmt1
NOREWIND0=/dev/rmt0.1
NOREWIND1=/dev/rmt1.1
daily_bkup()
{
echo "*************************************************************************" >> $logfile
echo "SAVEVG of volume groups USERVG1, USERVG2 & USERVG3 started AT `date`" >> $logfile
echo "*************************************************************************" >> $logfile
echo "" >> $logfile
for vg in uservg1 uservg2 uservg3
do
./usr/bin/savevg -f $NOREWIND1 '-i' '-m' '-X' $vg
done
if [ $? -eq 0 ]
then
echo "*************************************************************************" >> $logfile
echo "SUCCESS: Volume Group Backups completed successfully at `date +%H:%M`" >> $logfile
echo "*************************************************************************" >> $logfile
echo "" >> $logfile
else
echo "*************************************************************************************" >> $logfile
echo "FAIL: Volume Group Backups Failed at `date`" >> $logfile
echo "*************************************************************************************" >> $logfile
echo "" >> $logfile
fi
}