Skip to Main Content
  • Questions
  • Using RMAN and Dataguard for Backup and DRA

Breadcrumb

Question and Answer

Tom Kyte

Thanks for the question, Bill.

Asked: January 06, 2009 - 10:56 am UTC

Last updated: February 16, 2009 - 10:01 am UTC

Version: 10.2

Viewed 1000+ times

You Asked

Hi Tom,

I'm supporting a data warehouse that is approximately 750GB in size and grows everyday. I currently use RMAN for backups, but the backup is strictly to tape. Once a week full backup and an incremental each of the other days. The full backup is now taking about 15 hours to complete. I am looking into doing backups to disk and using an incremental update backup scheme where 7 days of incremental backups would be on disk and the incremental that is sysdate-7 will be used to update the full. In doing this I still need to have a tape backup of the database for disaster recovery. At the same time I am looking into creating a standby database on a system that is located geographically about 1000 miles from the primary system and am considering redo shipping to get the data to the standyby database so that the redo can be applied. With this I'm concerned about network traffic and what happens when there is a network issue preventing the transmission of the redo logs to the standby database system.

Can you give me any advice on what is the best way to setup the disk backups and standby database so that it can be dependably updated with current redo logs and also be used for production should the primary database be unavailable?

Thank You,

Bill

As far as the sysdate-7 for the incremental update backup scheme. I was thinking that I need to be able to restore to at least 7 days ago. I guess I will have that on tape should I need to restore to sometime more than a day ago. Looks like I was trying to make that much more complicated than it really is. What about redo logs, should I backup them up on both disk and tape?

With the standyby database. My main concern is with the network (sometimes it gets pretty saturated). During daytime business hours there are very few updates occurring on the database. Around 6:00PM several different batch cycles kick off and run for approximately 6 hours. During this time there are quite a few redo archives cut. Each archive is approximately 512M. I am considering maximum performance mode for the dataguard setup. If the log files cannot get transmitted immediately due to network issues, will they get shipped automatically when the network issues are cleared or will some intervention need to occur to get that process restarted? Also, in your opinion, would it be a good idea to backup the standyby database?

Thank You,

Bill


and Tom said...

... what about redo logs ...

you should have on tape all of the archives needed to recovery your oldest backup. you could keep them on disk as well in order to avoid having to restore them if you need them - but that is entirely up to you. On disk all you would need is "nothing", but what you probably want is all of the archives needed to restore the disk based backup (so all of the archives for a day) but they need to be on tape as well.


as for the standby, it depends on whether you would be using lgwr or arch to move the redo. if you use arch - it can get way behind BUT - it can get way behind (so if you suffer a failure right then, you might lose whatever you were behind on). If you use LGWR, that is buffered and sent - if you fill up the buffers and cannot send it fast enough - it will pause and wait for them to become free. If the network FAILS (we cannot reach standby) lgwr can fall back to using arch to send them later. But if the network is just slow - it will tend to impact you.

backing up the standby - probably "overkill", however, you could opt to backup the standby INSTEAD OF production if you wanted as that can be used to restore production with.
-------------------------------------------------------------------------


... I am looking into doing backups to disk and using an incremental update backup scheme where 7 days of incremental backups would be on disk and the incremental that is sysdate-7 will be used to update the full ...

can you explain that in more detail? why wouldn't you just backup once and then back that off to tape, and then constantly apply the incrementals to the disk based backup (backing that up to tape and keeping the last couple of backups there). I don't understand why you would use the seven day old incremental - just keep catching that backup up....


As for the "best way to setup the disk backups" - I would suggest just keeping the disk based backup "caught up". In the event of a media failure, you can restore rapidly from disk. You'll have the last few full backups (what appear to be full backups, you'll only take one full and never take another full again) on tape in the event the disk based area fails.

As for standby - that is pretty standard to setup. You just need to figure the mode you want to run in - whether the production should stop allowing modification if the standby cannot be contacted or not basically. Do you have a specific question?

Rating

  (8 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

You've made it quite clear and simple

Bill, January 06, 2009 - 4:33 pm UTC

As far as backing up the redo logs comment. I was referring to the archived redo logs. Sorry I wasn't clear on that. Your response did cover it though. I think that my initial setup for the standby database will be maximum performance.

Thank You very much for making this look so easy.

Bill

A reader, February 10, 2009 - 12:04 pm UTC

Hi - Recently we exercised a disaster recovery test and we faced one problem while doing backups. This is the scenario. We currently run backups on our primary production database. During the disaster recovery test, we switched over to the physical standby and started taking backups on the standby site. After the test was complete, we switched back and when our backups were now back to the original primary, we were facing RMAN-06214 errors. Tried to simulate that in our test environment and received the same errors. The list of commands that we run in our backup script are

crosscheck backup;

crosscheck copy;

delete NOPROMPT expired backup;

delete NOPROMPT expired copy;

delete NOPROMPT ARCHIVELOG ALL COMPLETED BEFORE 'TRUNC(SYSDATE-1)';

delete NOPROMPT obsolete redundancy=2 device type disk;

While doing the delete NOPROMPT obsolete .... command we are facing the following errors

RMAN-06207: WARNING: 4 objects could not be deleted for DISK channel(s) due
RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status
RMAN-06210: List of Mismatched objects
RMAN-06211: ==========================
RMAN-06212: Object Type Filename/Handle
RMAN-06213: --------------- ---------------------------------------------------
RMAN-06214: Archivelog /ora.dump/backup/flash_recovery_area/DBSTBY/archivelog/2009_02_09/o1_mf_1_456_4s
0qkt6l_.arc
RMAN-06214: Archivelog /ora.dump/backup/flash_recovery_area/DBSTBY/archivelog/2009_02_09/o1_mf_1_457_4s
0qny0w_.arc
RMAN-06214: Archivelog /ora.dump/backup/flash_recovery_area/DBSTBY/archivelog/2009_02_09/o1_mf_1_458_4s
0qo3q5_.arc
RMAN-06214: Archivelog /ora.dump/backup/flash_recovery_area/DBSTBY/archivelog/2009_02_09/o1_mf_1_459_4s
0qss0y_.arc

The directory structure DBSTBY is on the standby site and on the primary site the directory structure is /ora.dump/backup/flash_recovery_area/DBPRI.

What we are trying to understand is, how to resolve these issues and in such a scenario what is the standard method to do backups.

Thanks.
Tom Kyte
February 11, 2009 - 9:25 am UTC

I don't know all of the details - I don't know if you switched over or failed over (if a switch over, I don't know why you would backup even?)

and did you crosscheck?

A reader, February 11, 2009 - 10:52 am UTC

Yes we did a switch over and we did do a crosscheck ?

You said you dont know why we would do a backup if we did a switchover. What is the reason for that ?
Tom Kyte
February 11, 2009 - 1:05 pm UTC

you switchover for a relatively short period, why would you do a backup? You switchover to

a) prove you can
b) do some scheduled maintenance on production


shows forethought in plans

Bill Hoffman, February 11, 2009 - 11:47 am UTC

Hi Tom,

I understand that this was a DR test. If can fully understand doing a backup during one of these drills. It's not just "Can I bring up my systems elsewhere". It's "Can I continue business operations elsewhere". Performing a backup during a DR test shows that they are planning for Business Continuity.

Bill
Tom Kyte
February 11, 2009 - 1:12 pm UTC

I asked what they were doing - in the event of failover - we'd need to discuss what the 'fail back' operations where. In the case of a switchover, not so.

A reader, February 11, 2009 - 2:18 pm UTC

We switched over and stayed in the standby site for about 2 weeks to ensure that we are still operational if a need arises to switch to the standby site. That is why we had to continue to take level 0 backups on the weekend in between and incremental backups during the 2 weeks.

What would you have in such a situation ?
Tom Kyte
February 11, 2009 - 3:01 pm UTC

what were you backing up to in this case (you see, there are lots of moving pieces). Was it the same place or a new place.

A reader, February 11, 2009 - 3:11 pm UTC

Originally we were backing up to disk on the primary site and after the switchover and for the 2 weeks we were backing up to disk on the standby site.

Both times we were connected to the same recovery catalog.
Tom Kyte
February 12, 2009 - 10:39 am UTC

well, it is like you simulated a failover (everything was going on the standby for two weeks). The backups you took there were registered in the catalog for that database - but are not available on the production site. So in your case, you would crosscheck to sort of clear out the discrepancies - and get everything 'in sync'

In real life, your backups would have been available on the fail over site - or they should be, so you would have one backup ultimately - that is, if you were doing disk based backups, eventually you get those to tape and the tapes are off site somewhere, they would be made available to the failover so you can disk based backup there, and then add to the tape - so the only thing that really gets out of sync would be the disk based stuff.

But you see the issue - the backups on each location were not/are not visible to the other. The way you have it, they are completely separate 'chains'

A reader, February 12, 2009 - 1:43 pm UTC

Would you consider this as a feasible option - take backups of one site (either primary/standby) and continue to backup the same site even when the role changes ?
Tom Kyte
February 12, 2009 - 4:45 pm UTC

well, that would not have accomplished their goal in this case - that of making sure the secondary site could do everything the primary site does - in the event of total loss.

but yes, you could

A reader, February 12, 2009 - 6:48 pm UTC

Does anything have to change in order to backup a physical standby ? Is backing up a physical standby a good strategy ? I read that enabling block change tracking will not work for a physical standby till Oracle 11g. In that case, what is the impact of implementing backups in physical standby. would you consider that as a good option ?
Tom Kyte
February 16, 2009 - 10:01 am UTC

http://docs.oracle.com/docs/cd/B19306_01/server.102/b14239/rman.htm#CHDEDICG

would it be a good option? Sure, typically the standby site is "doing less" and the production site is "doing more". Offloading workload from production to standby can make for better overall utilization

More to Explore

Backup/Recovery

Check out the complete guide to all of the Backup & Recovery techniques in the Oracle Database.