Operating System - Tru64 Unix
1751709 Members
4938 Online
108781 Solutions
New Discussion юеВ

2 drives for backups

 
SOLVED
Go to solution
VILLALOBOS
Occasional Contributor

2 drives for backups




Hello All , I need your help , I need active 2 drives in this moment only one work, How cai I make this ?



EXAMPLE :

#!/bin/sh
# filename: /backup/script/osbackup
#
# This script will back up the Oracle and SAP executables
# to tape device rmt0h using the AdvFS vdump utility.
#
# Prerequisites: write-enabled tapes in drive rmt0.
#
# The SAP instance must be shutdown to perform this backup
#
INSTANCENAME=SP1
ADMACCT=tstadm
LOGFILE=/backup/log/bdofflinebkp.log
TAPE=/dev/rmt0h
NR_TAPE=/dev/nrmt1h

#
# Resetting the log file for backup
#
if [ -f $LOGFILE ]
then
mv $LOGFILE $LOGFILE.old
touch $LOGFILE
fi
echo "Ready to start backup at `date`" >> $LOGFILE
echo >>$LOGFILE
6 REPLIES 6
Rob Leadbeater
Honored Contributor
Solution

Re: 2 drives for backups

Hi,

If you're just using the OS built in command vdump, then you'll have to identify which file systems can be backed up at the same time, and then start off two simultaneous vdump commands, one on /dev/rmt0h and one on /dev/rmt1h.

If you don't know how to do this, then try posting the rest of your backup script and we'll see if we can help.

It would also be useful to know what version of Tru64 you're using.

Hope this helps,

Regards,

Rob
VILLALOBOS
Occasional Contributor

Re: 2 drives for backups


Hi Rob, this is a script




#!/bin/sh
# filename: /backup/script/osbackup
#
# This script will back up the Oracle and SAP executables
# to tape device rmt0h using the AdvFS vdump utility.
#
# Prerequisites: write-enabled tapes in drive rmt0.
#
# The SAP instance must be shutdown to perform this backup
#
INSTANCENAME=SP1
ADMACCT=tstadm
LOGFILE=/backup/log/bdofflinebkp.log
TAPE=/dev/rmt0h
NR_TAPE=/dev/rmt1h

#
# Resetting the log file for backup
#
if [ -f $LOGFILE ]
then
mv $LOGFILE $LOGFILE.old
touch $LOGFILE
fi
echo "Ready to start backup at `date`" >> $LOGFILE
echo >>$LOGFILE

/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /usr/sap >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /usr/sap/trans >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /sapmnt/SP1 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/stage >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapbackup >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/saparch >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapreorg >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/origlogA >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/mirrlogA >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/origlogB >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/mirrlogB >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata1 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata2 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata3 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata4 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata5 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata6 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata7 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata8 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata9 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata10 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata11 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata12 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata13 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata14 >>$LOGFILE 2>&1
/sbin/vdump -0 -v -u -N -F 64 -b 64 -f $NR_TAPE /oracle/SP1/sapdata15 >>$LOGFILE 2>&1

echo -n "Unmounting tape..."
mt -f $TAPE offline
echo "Done."
echo "backup finished at " `date` >>$LOGFILE

echo "Please remove tapes from system" >>$LOGFILE
exit
Rob Leadbeater
Honored Contributor

Re: 2 drives for backups

OK. Create two copies of this script.

In one of them define:

TAPE=/dev/rmt0h
NR_TAPE=/dev/nrmt0h

in the other define:

TAPE=/dev/rmt1h
NR_TAPE=/dev/nrmt1h

Then based on the amount of data in each of your filesystems, split the vdump commands between the two. For example you might want to put sapdata1 to 7 in the first copy of the script and sapdata8 to 15 in the second copy.

Regards,

Rob
VILLALOBOS
Occasional Contributor

Re: 2 drives for backups


Can I use the two drives one by one for the same script? I need put in the cron this backup .. There is a not problem if I run the 2 scripts in the same time?


Thanks for you help, realy many thanks

I am learning this system ...
Rob Leadbeater
Honored Contributor

Re: 2 drives for backups

Hi,

There shouldn't be any reason why you can't run both scripts from the cron at the same time.

Regards,

Rob
Rob Leadbeater
Honored Contributor

Re: 2 drives for backups

Just realised as I'd typed that, that you'll probably want to make the LOGFILE name unique to each script.

Regards,

Rob