Operating System - HP-UX
1748074 Members
5414 Online
108758 Solutions
New Discussion юеВ

Re: BC Split-mirror backup of Oracle

 
SOLVED
Go to solution
Bala_8
Frequent Advisor

BC Split-mirror backup of Oracle

Hi,

I'm working with Oracle 8.1.7.3 on HP-UX 11.0.
My datafiles are located in XP-512.
The backup routine is as follows:
1. Put the DB under backup mode (tablespace begin backup)
2. Get snapshot of archive log
3. Split the volume in DB Server
4. Put the DB under normal mode (tablespace end backup)
5. Mount the splitted volumes into my Backup Server
6. Do the backup using Omniback
7. Remove the archive log from Backup Server as per the snapshot collected at step 2
8. Unmount the filesystem from Backup Server
9. Resync the splitted copy with the primary volume.

In the above steps the one which confuse me a lot is the resync stage. How the resync works? Is the splitted volume copied to the primary volume OR primary volume copied to the splitted volume ?

What about the recovery stage ? How do i recover ? which volume will resync with which volume ?

Is there any detailed documentation in this regard ?

Looking forward for your valuable feedbacks ..

Cheers
-bala-
10 REPLIES 10
Bala_8
Frequent Advisor

Re: BC Split-mirror backup of Oracle

Correction at step 7 above:
Remove archive log from the DB Server as per snapshot collected at step 2
Aashish Raj
Valued Contributor

Re: BC Split-mirror backup of Oracle

When you resync(merge) the splitted volume with primary volume, the splitted volume will be synchronized with primary volume's data.The time taken to synchronize will depend on how much data has been changed on primary voulmes since the mirror is broken(split).

You can also use alter database suspend/resume command in conjunction with alter tablespace begin/end backup to speed up the splitting of volume.

see Oracle 8i Administrators guide which explains this concept.

hth
AR
Roger Baptiste
Honored Contributor
Solution

Re: BC Split-mirror backup of Oracle


hi,

DBserver --Primary --> BCV ---- Backup server

When you resync the BCV, the BCV disks are mirrored to the Primary disks again. It's always a one-way traffic from Primary to BCV (and it better be! unless you want to restore from BCV to the primary in the event of a crash etc). Instead of syncing each and every byte, it does a smart incremental sync of only the changes on the primary disks.
The other type of sync is the fullsync, which is done only at the first time when the disks are set up. After that, it is always incremental.

A related question- Why do you want to keep the bcvs synced all the time?? It doesn't make sense. Suppose the database gets corrupted. In that case, to restore the database, you would need tape backups. If the BCV is kept split, you can simply restore the BCV data onto primary disks, which is quicker. You can do the resync only on the days of the backup (or a few hours before the backup).

Hope this helps
-raj
Take it easy.
Ashwani Kashyap
Honored Contributor

Re: BC Split-mirror backup of Oracle

When you establish a miiror between the BC volume and the primary volume for the first time , it should always be a full sync ( have to use the full sysnc option ) . THe data is synced from the primary volumes onto the BC volumes . Subsequent syncs are incremental syncs only by default unless you specify a full sync . After the first full sync and split , XP keeps a track of changes made on the primary volumes . When you sync it next time only the tracks that have changed on the primary volumes are synced to the BC volume therby taking a lot less time and the BC volumes still holds the complete data . The sync is always from the primary volumes to the BC volumes unless you ask for a restore , in which case the data is restored from the BC volumes onto the primary volumes .

One thing to be noted is all syncing is done on a track basis i.e every track on the primary volumes are copied to the tracks on the BC volumes .SO there is no file level restores , its always track level .
Bala_8
Frequent Advisor

Re: BC Split-mirror backup of Oracle

How do i perform a restoration ?? i mean how can i resync the primary volume with that of Splitted volume, since i restored the data from tape to the mounted split volume in my Backup Server.

thanks all for your responses ....

-bala-
Dave Wherry
Esteemed Contributor

Re: BC Split-mirror backup of Oracle

The sync can work in either direction. The primary can sync to the backup and the backup can sysnc to the primary. Either way, it can be initiated from the primary or the backup. It all depends on the options you use with the pairresync command. The net of it all is BE VERY CAREFULL. You can easily sync yesterdays backup copy over your current primary copy and corrupt your data.
If you are not comfortable with how it works and especially how it is setup on your systems, I suggest you get your HP ASE on-site and document it. I assume this is all triggered through scripts and it will be easy to document. If the scripts are working, good. Leave them alone until you better understand the process and do not try the commands by yourself. While the resynce time depends on the amount of data that has changed, an incorrect resync can corrupt your data in about 1 second.
Rory R Hammond
Trusted Contributor

Re: BC Split-mirror backup of Oracle

lvsync is easy and very predictable
For example I have
/dev/vg02/lvol48 /mnt/db10

To split the mirror
/usr/sbin/lvsplit /dev/vg02/lvol48

The above command creates two lvols
/dev/vg02/lvol48
and
/dev/vg02/lvol48b

you might have to do a fsck on /dev/vg02/lvol48b to mount it

fsck -p /dev/vg02/lvol48b
or
fsck -F hfs -p /dev/vg02/lvol48b
or
fsck -F vxfs -p /dev/vg02/lvol48b

Then you mount
mount /dev/vg02/lvol48b /backup

When done and the real answer to your question and concern
umount /dev/vg02/lvol48b

/usr/sbin/lvmerge /dev/vg02/lvol48b /dev/vg02/lvol48

THE ORDER IS VERY IMPORTANT
man page shows the first argument as the destination and the second as the source.

Since the Live volume is lvol48 it is the Second argument (source)



lv


for backup



There are a 100 ways to do things and 97 of them are right
Ian Dennison_1
Honored Contributor

Re: BC Split-mirror backup of Oracle

lvsync is fine for small lvols and localised storage.

However it will load down the SAN to which you are connecting to the XP512. Business Copy is far better, as it uses the bandwidth of the local crossbar within the XP512, and does an incremental sync (moving only those disk blocks that have changed).

Share and Enjoy! Ian Dennison
Building a dumber user
Bala_8
Frequent Advisor

Re: BC Split-mirror backup of Oracle

Thanks all for the update ....

My pair create script looks like below:

#!/usr/bin/sh
export HORCMINST=0
export HORCC_MRCF=1
horcmstart.sh 0 1
#
#
paircreate -g VG01 -d vg01_0 -vl -c 15
paircreate -g VG02 -d vg02_0 -vl -c 15
paircreate -g VG03 -d vg03_0 -vl -c 15
paircreate -g VG04 -d vg04_0 -vl -c 15
paircreate -g VG05 -d vg05_0 -vl -c 15
paircreate -g VG06 -d vg06_0 -vl -c 15
paircreate -g VG07 -d vg07_0 -vl -c 15
paircreate -g VG08 -d vg08_0 -vl -c 15
paircreate -g VG09 -d vg09_0 -vl -c 15
#
#
pairdisplay -g VG01 -fc
pairdisplay -g VG02 -fc
pairdisplay -g VG03 -fc
pairdisplay -g VG04 -fc
pairdisplay -g VG05 -fc
pairdisplay -g VG06 -fc
pairdisplay -g VG07 -fc
pairdisplay -g VG08 -fc
pairdisplay -g VG09 -fc

My split script looks like below :

#!/usr/bin/sh
export HORCMINST=0
export HORCC_MRCF=1
horcmstart.sh 0 1
#
#
pairsplit -g VG01 -d vg01_0
pairsplit -g VG02 -d vg02_0
pairsplit -g VG03 -d vg03_0
pairsplit -g VG04 -d vg04_0
pairsplit -g VG05 -d vg05_0
pairsplit -g VG06 -d vg06_0
pairsplit -g VG07 -d vg07_0
pairsplit -g VG08 -d vg08_0
pairsplit -g VG09 -d vg09_0
pairsplit -g VG09 -d vg09_1
#
#
pairdisplay -g VG01 -fc
pairdisplay -g VG02 -fc
pairdisplay -g VG03 -fc
pairdisplay -g VG04 -fc
pairdisplay -g VG05 -fc
pairdisplay -g VG06 -fc
pairdisplay -g VG07 -fc
pairdisplay -g VG08 -fc
pairdisplay -g VG09 -fc

And my resync script looks like below :

#!/usr/bin/sh
export HORCMINST=0
export HORCC_MRCF=1
horcmstart.sh 0 1
pairresync -g VG01 -d vg01_0
pairresync -g VG02 -d vg02_0
pairresync -g VG03 -d vg03_0
pairresync -g VG04 -d vg04_0
pairresync -g VG05 -d vg05_0
pairresync -g VG06 -d vg06_0
pairresync -g VG07 -d vg07_0
pairresync -g VG08 -d vg08_0
pairresync -g VG09 -d vg09_0
pairresync -g VG09 -d vg09_1
#
#
pairdisplay -g VG01 -fc
pairdisplay -g VG02 -fc
pairdisplay -g VG03 -fc
pairdisplay -g VG04 -fc
pairdisplay -g VG05 -fc
pairdisplay -g VG06 -fc
pairdisplay -g VG07 -fc
pairdisplay -g VG08 -fc
pairdisplay -g VG09 -fc

Now tell me how it works ? So far the backup is going fine daily... I'm concerned about the recovery .... In case i do a restore in the split copy mounted to my backup server, how can i resync it to the primary volume in DB Server? Do i need to make any changes to the resync script, shown above ???

cheers
-bala-