Home » RDBMS Server » Backup & Recovery » How does RMAN recovery with its retention policy? (DB 10.2.0, RMAN catalog)
How does RMAN recovery with its retention policy? [message #307438] Tue, 18 March 2008 21:37 Go to next message
trantuananh24hg
Messages: 668
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
Good morning, every body!

Really, I am in a deviced mind as to what RMAN choose thing within the retention policy? With WINDOW RECOVERY OF 7 DAYS, which one backup will be marked obsolete when RMAN backup full?
Note that all of the backup full with all archivelog files.
Example
RMAN> list backup;


List of Backup Sets
===================

BS Key  Type LV Size       Device Type Elapsed Time Completion Time
------- ---- -- ---------- ----------- ------------ ---------------
4225    Full    17.17G     DISK        00:28:51     08-MAR-08
        BP Key: 4228   Status: AVAILABLE  Compressed: NO  Tag: TAG20080308T10124
8
        Piece Name: /u03/backupVNP/BackupVNP_DB_17jao7p2_39_1
  List of Datafiles in backup set 4225
  File LV Type Ckp SCN    Ckp Time  Name
  ---- -- ---- ---------- --------- ----
  1       Full 20045233644 08-MAR-08 /u03/oradata/VNP/system01.dbf
  2       Full 20045233644 08-MAR-08 /u03/oradata/VNP/undotbs01.dbf
  3       Full 20045233644 08-MAR-08 /u03/oradata/VNP/sysaux01.dbf
  4       Full 20045233644 08-MAR-08 /u03/oradata/VNP/users01.dbf
  5       Full 20045233644 08-MAR-08 /u03/oradata/VNP/users02.dbf
  6       Full 20045233644 08-MAR-08 /u03/oradata/VNP/users03.dbf
  7       Full 20045233644 08-MAR-08 /u03/oradata/VNP/rman.dbf
  8       Full 20045233644 08-MAR-08 /u03/oradata/VNP/undotbs2.dbf

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
4312    459.10M    DISK        00:00:25     08-MAR-08
        BP Key: 4321   Status: AVAILABLE  Compressed: NO  Tag: TAG20080308T10422
9
        Piece Name: /u03/backupVNP/BackupVNP_DB_18jao9gm_40_1

  List of Archived Logs in backup set 4312
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    345     20044942149 08-MAR-08 20045348658 08-MAR-08


OKIE, those are the pieces of RMAN backup full, at 08/03/2008 - DD/MM/YY. They are not obsolete, but may be, at 20/03/2008 they will be obsolete. In the Oracle documents, the obsolete was identified by ....

Quote:

In other words, one backup of each datafile must satisfy the condition SYSDATE - CHECKPOINT_TIME >= RECOVERY WINDOW. All backups older than the most recent backup that satisfies this condition are obsolete.



And I asked my self
What is the CHECKPOINT_TIME that RMAN identify?
Of course, if the RMAN identify CHECKPOINT_TIME, we must do it like, how do I?

And the second question:
If there are 2 backup full exist in the Destination_backup_folder, one was at 08/03, one was at 15/03. If I remove the 08/03_backup, may be the recovery processing will be failed. Why?

Please explain and make me more clarify.
Thank you very much!

[Updated on: Tue, 18 March 2008 21:44]

Report message to a moderator

Re: How does RMAN recovery with its retention policy? [message #307517 is a reply to message #307438] Wed, 19 March 2008 01:11 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
CHECKPOINT_TIME is the time where modified blocks are written to disk.
The principle of recovery windows is that you can recover the database at any time in the windows you defined.
On 20/03 if you have backup at 08/03 and 15/03 and a recovery windows of 7 days you can't remove 08/03 bakcup backup because you must be able to recover at (for instance) 14/03 which need 08/03 backup.

Regards
Michel
Re: How does RMAN recovery with its retention policy? [message #307544 is a reply to message #307517] Wed, 19 March 2008 01:51 Go to previous messageGo to next message
trantuananh24hg
Messages: 668
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
Thank you, Michel, for your answer.

I know that, 2 backup 08 and 15 /03 will be not marked as obsolete piece in the RMAN's policy. But I wonder:

- One is 08/03, one is 15/03. Okie, assuming that DB will be recovered at 14/03, but, if DB crash at 14/03, there is no backup that I make, because the day is 14, not 15/03. I think that, RMAN find the neariest backup to restore and recover. With this situation, the backup is at 08/03.

- However, if I assume like that, there is no conception as hot backup. Now, the hot backup is understood easily like BACKUP DATABASE WHEN RUNNING, no more. Therefore, I think, Oracle server understands that, and how does it find the best way to do?

The way that RMAN does itself business is
+ Track the change of datafile, block by block
+ Keep the SCN that was updated into catalog/control_file
+ Modifies all of backup_datafiles before by new blocks.
....

According to the way, why does RMAN not choose the newest instead of the older backup?

Thank you!
Re: How does RMAN recovery with its retention policy? [message #307561 is a reply to message #307544] Wed, 19 March 2008 02:24 Go to previous messageGo to next message
Michel Cadot
Messages: 64140
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
One is 08/03, one is 15/03. Okie, assuming that DB will be recovered at 14/03, but, if DB crash at 14/03, there is no backup that I make, because the day is 14, not 15/03. I think that, RMAN find the neariest backup to restore and recover. With this situation, the backup is at 08/03.

But maybe it is 20/03 and you want to recover at 14/03 and not at 20/03, this is what means your retention policy: you want to be able to restore at any time in the past 7 days. If you just need to recover at the current time, you don't need such a policy.

Yes, RMAN takes the last avalaible backup to restore/recover a database unless you tell it to not doing so.

By the way, RMAN does not " Track the change of datafile, block by block"; it does not "Keep the SCN that was updated into catalog/control_file", this is done by the instance and is independent of RMAN...

Regards
Michel

[Updated on: Wed, 19 March 2008 02:26]

Report message to a moderator

Re: How does RMAN recovery with its retention policy? [message #307787 is a reply to message #307561] Wed, 19 March 2008 21:04 Go to previous message
trantuananh24hg
Messages: 668
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
Yes, thank you, Michel.

I understood more. I've read many times the Oracle document's RMAN, but I really did not understand the way RMAN done.
Previous Topic: RMAN Backup and Restore (Full)
Next Topic: RMAN Backup Strategy Recommendations
Goto Forum:
  


Current Time: Fri Dec 09 07:56:41 CST 2016

Total time taken to generate the page: 0.24374 seconds