Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

backup question...

Status
Not open for further replies.

B14speedfreak

Technical User
Mar 23, 2006
182
Hi alls,

thanks in advance for reading and any posts, please bare with me as I am a bit new to oracle and RMAN.

We currently do hot and cold backups to tape on production and test Oracle databases. We use Netbackup 5.1 to achieve this.

Can anyone please clarify this:

If we run a backup of one of the databases, then run an RMAN reposity database backup and a netbackup catalog backup, and then run a second oracle database backup and then loose everything (a giant tomarto squishes everything except for the backup tapes!) we would only be able to ultimately restore to the first database backup as the second would not be registered in both the RMAN and Netbackup catalog? In other words, we can only restore using backups that are in the rman and netbackup catalog. Does that make sense, have I understood it correctly?

Thanks in advance for reading and any posts,

Mark.

B14... aka... Marky Mark... the frozen monkey in the server room...
 
Mark,

The bottom line is this:

Scenario A: (Database is in either ARCHIVELOG or NOARCHIVELOG mode)

1) Database is "up and running",
2) Copy all database files using either NetBackup or some o/s copy command,

Result: such a "backup" is useless.

Scenario B: (Database is in NOARCHIVELOG Mode)

1) Perform a graceful database shutdown (i.e., "shutdown" or "shutdown immediate", but not "shutdown abort"),
2) Copy all database files using either NetBackup or some o/s copy command,

Result: You can use such a backup to restore only to the point in time that you gracefully shutdown the database.

Scenario C: (Database is in ARCHIVELOG Mode)

1) Perform a graceful database shutdown (i.e., "shutdown" or "shutdown immediate", but not "shutdown abort"),
2) Copy all database files using either NetBackup or some o/s copy command,

Result: You can use such a backup to either 1) restore the database to the point in time that you gracefully shutdown the database, OR, 2) you can use such a backup to select one or more database data files to replace a (corrupted) database data file, then Recover the database to the most recently committed transaction.

Scenario D: (Database is in ARCHIVELOG Mode, not using RMAN)

1) Database is up and running.
2) For each tablespace,
"ALTER TABLESPACE <tablespace name> BEGIN BACKUP;"
3) Backup/Copy tablespace data files for that tablespace to a backup location
4) "ALTER TABLESPACE <tablespace name> END BACKUP;"

Result: You can use such a backup to select one or more database data files to replace a (corrupted) database data file, then Recover the database to the most recently committed transaction.

Scenario E: (Database is in ARCHIVELOG Mode, using RMAN)

RMAN accomplishes the same as Scenario D, above.

Let us know if this answers your questions.

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[I can provide you with low-cost, remote Database Administration services: see our website and contact me via www.dasages.com]
 
Not quite. I understand the about getting hot archive log mode backups and cold shutdown backups.

Now this is my question. When using an RMAN database as repositry all the backups of the registered database are recorded in the RMAN database (allows you to do point in time recoveries etc...). This part I understand. Ok now, if I loose both the database and the RMAN catalog, I can only restore the database using backups that are registered in the RMAN catalog correct? So if say for example, I do a backup of my database, then a backup of the repositry, and then another database backup (for arguments sake hot full backup). After I have these three backups, if the rman repositry and the database decide to spontaniously combust and I am left with just the backups. I will only ever be able to restore to the first backup of my database, since when I restore the RMAN database, the second backup will not be registered in there (therefore I won't be able to find it). Does that make sense?

Now thats one part of it. But also because my media manager has another database (lots of databases!) which determines what files are stored on what tapes. So taking this all a stage further and back to my original point:

If I loose everything, I can only restore my oracle database using a backup which is stored in both the RMAN database and the Netbackup database.

So for example:

11:00 I backup my oracle database

12:00 I backup my rman catalog

12:00 I backup my netbackup catalog

13:00 I backup my oracle database again

14:00 a flying sourcer comes down from the planet zog and transmogrifies the server room to Mars leaving me just the backup tapes.

Right when I come to do my restore, firstly I restore the netbackup catalog so that I know which tape has the rman catalog backup on it. I then restore the RMAN database catalog. Now I can only restore my database from the backup that was taken at 11:00 since the one at 13:00 was not in the netbackup catalog and the RMAN catalog when they where backed up.

Does this sound correct. This is simply because the RMAN catalog won't have it listed and the netbackup catalog will not know which tape its on!

Thanks for the posts,

B14... aka... MArky MArk...

B14... aka... Marky Mark... the frozen monkey in the server room...
 
Fortunately, Oracle 9i includes features that make recovery from an rman backup possible, even when the rman catalog has been lost. Specifically, you can (and should) turn controlfile autobackup on via the rman command

Code:
configure controlfile autobackup on;

Having controlfile autobackup turned on causes Oracle to automatically back up the control file every time you run a backup command in rman.

The nice feature about the autobackup of the control file is that rman can use it to restore the control file, even without access to the recovery catalog. The restored control file can, in turn, be used to restore the rest of the database from the latest back up.

So the answer to your specific question is, as usual, "it depends". If your backup tapes contain a copy of the controlfile autobackup done at 13:00, then you should be able to recover your database to 13:00.
 
Hi Thanks for the posts again they are really useful.

Ok say for arguments sake that I have the control file backup turned on (in our hot backups scripts we normally do a backup of the control file, archive logs, and datafiles (normally clearing out the old archive logs for space). Now I suppose really this is more of a veritas question, but I will need a backup of the netbackup catalog, otherwise I am not going to know which tapes have which data on it (since netbackup does something to the format of tapes I am told). Well thats one area, but using the control file backup how would I restore the database in RMAN? Guess thats something I need to read up.

Basically I am looking at our current backup strategy and trying to work out what would happen if we lost everything and how much data we would loose (on our main production box I am told that we carn't afford to loose more than 20 mins apparently thats our SLA). The way I am thinking at the moment as a way of making sure of this, is after each hot backup, we do a netbackup catalog backup and an RMAN repositry backup. Anyhow I guess I will have to just read up a lot more on RMAN and Nebackup and just try to test it out and see what and how I can do it.

Thanks for the posts guys they have been really really useful, if anyone thinks of anything else just let me know...


B14... aka... Marky Mark... the frozen monkey in the server room...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top