Operating System - HP-UX
1851722 Members
1660 Online
104062 Solutions
New Discussion

Re: Major issue with script backup

 
tayal_sumit
Occasional Advisor

Major issue with script backup

Hi All,

I am facing a very critical condition. Actually i am taking backup of my HP-UX 11.23 server through which is mentioned below.

mt -f /dev/rmt/2mn rew
echo "Dump Started at \c"
echo "`date +%D` \c"
echo "`date +%T` "
#remove_arch.sh
#remove_arch.sh
logfile=bkpfbk_`date +"%b_%d"`
logfile1=bkp1_`date +"%b_%d"`
###########################################################
#file system for full backup
##################################################################
fbackup -0uvf /dev/rmt/2mn -i /oradata 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /volume/tcae/pi_vol 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /volume/tcae/tds_vol2 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /volume/tcae/dba_vol2 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /volume/tcae/msail_vol 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /volume/tcae/pe_vol2 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /volume/tcae/remote_vol 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /volume/tcae/eng_vol2 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /volume1 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /volume2 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /exp 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /appl 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /exec 2>&1 |tee -a $logfile
fbackup -0uvf /dev/rmt/2mn -i /fort 2>&1 |tee -a $logfile

sh /home/dump/bin/mktar.sh
fbackup -0uvf /dev/rmt/2mn -i /volume/cico/cico.tar 2>&1 |tee -a $logfile
echo "Sucessfully Completed \c"
echo "`date +%D` \c"
echo "`date +%T` "
cp $ORACLE_BASE/backup/nohup.out $ORACLE_BASE/backup/backup.log
$ORACLE_BASE/jobs/sysmonitor/timestamp.sh >> $ORACLE_BASE/backup/backup.log
cat $logfile >> $HOME/backup/backup.log

after completion of this script it shows backup completed successfully.But when i am generating catalogs through

frecover -I /tmp/catalog.txt -v -f /dev/rmt/2mn command it shows only
/volume/cico/cico.tar

I don't what is happening what is wrong with the script and I think that it is rewinding the tape after completion of on file system backup.

Please suggest me what to do.
ASAP

regards,
4 REPLIES 4
VK2COT
Honored Contributor

Re: Major issue with script backup

Hello,

Please refer to the following URL:

http://docs.hp.com/en/B2355-90672/ch09s05.html

Pay special attention to the following statement:

Multiple, independent backups on a single tape:
Not possible (fbackup rewinds the tape).

Cheers,

VK2COT
VK2COT - Dusan Baljevic
Dennis Handly
Acclaimed Contributor

Re: Major issue with script backup

>I am taking backup of my HP-UX 11.23 server through which is mentioned below.

I'm not sure you can put multiple backups on your norewind tape? I'm not sure if frecover can figure out what you did. Or you would have to use mt(1) to space to each part before you do frecover(1)?

As documented, why not pass in multiple -i paths so you don't need to repeat fbackup over and over?

fbackup -0uvf /dev/rmt/2mn -i /oradata \
-i /volume/tcae/pi_vol \
-i /volume/tcae/tds_vol2 \
-i /volume/tcae/dba_vol2 \
-i /volume/tcae/msail_vol \
-i /volume/tcae/pe_vol2 \
-i /volume/tcae/remote_vol \
-i /volume/tcae/eng_vol2 \
-i /volume1 \
-i /volume2 \
-i /exp \
-i /appl \
-i /exec \
-i /fort 2>&1 |tee -a $logfile

(Note: I would suggest you not use tee. Just send the output to $logfile and cat it to stdout if you want to see another copy.)
Michael Steele_2
Honored Contributor

Re: Major issue with script backup

Hi Taval:

You can get some information on tape devices under 'man mt'. Regarding rewinding, I'd change this,

fbackup -0uvf /dev/rmt/2mn

...to...

/dev/rmt/2m

2mn = no rewind
2m = rewind
Support Fatherhood - Stop Family Law
Bill Hassell
Honored Contributor

Re: Major issue with script backup

Each fbackup command wrote on top of all the previous backups. This is by design so that the complete contents of the tape can be seen in the index. This would be the correct command:

fbackup -0uvf /dev/rmt/2mn -i /oradata -i /volume/tcae/pi_vol -i /volume/tcae/tds_vol2 /volume/tcae/msail_vol -i /volume/tcae/pe_vol2 -i /volume/tcae/remote_vol -i /volume/tcae/eng_vol2 -i /volume1 -i /volume2 -i /exp -i /appl -i /exec -i /fort 2>&1 |tee -a $logfile

Unlike archaic Unix tools such as cpio and tar, the tape is ALWAYS rewound by fbackup at the beginning. There is no append in fbackup. Every file on the tape created by fbackup is first put into the index at the front of the tape. This means that you can always identify exactly what is on the tape. This index is instantly available with frecover -I and provides very high speed restores by telling frecover how far to position the tape to restore a particular file or directory.


Bill Hassell, sysadmin