Home » RDBMS Server » Backup & Recovery » Recovery from Previous Backups(RMAN) (Oracle 9i on Windows / Linux)
Recovery from Previous Backups(RMAN) [message #429040] Sun, 01 November 2009 10:09 Go to next message
chetanaZ
Messages: 132
Registered: October 2009
Location: UK
Senior Member
Hi,

I am taking RMAN hot backups every night with redundancy level 2

Now I want to recover backup which was taken to 2 days back

for example-> On 25 I have rman backups taken on 23rd and 24th evening
on 25th I want to recover backup that was taken on 23rd

How can I restore that backup?
Do I need to use
'recover database until SCN'?


Do i need to restore controlfile too with 'until SCN' in both of following cases?
1) File structure was changed after rman backup on 23rd evening
2) File structure was Not changed after rman backup on 23rd evening

How I can get the particular SCN?
I issued 'list Backup' command but not sure whether and how to use the output for above purpose

Thanks and Regards,
Chetana


Re: Recovery from Previous Backups(RMAN) [message #429052 is a reply to message #429040] Sun, 01 November 2009 21:31 Go to previous messageGo to next message
ebrian
Messages: 2794
Registered: April 2006
Senior Member
Check Performing Database Point-In-Time Recovery for all the details on PITR recovery.
Re: Recovery from Previous Backups(RMAN) [message #429180 is a reply to message #429040] Mon, 02 November 2009 07:55 Go to previous messageGo to next message
chetanaZ
Messages: 132
Registered: October 2009
Location: UK
Senior Member
Ebrian,

Many thanks for the reply.

The link is specific to 10g moreover my case differs in following points
1) There is no Incarnation refrence I need in case below
2) I do not have access to database from whose backups, I will clone database on another server

My question is simple
I have complete RMAN backup of database db1 taken at 21:00 on 23/11/09
I have complete RMAN backup of database db1 taken at 21:00 on 24/11/09
These backups are stored on /shared_drive_backup which can be accessed from another server where we want to clone db1

Now On 25/11/09 I want restore and recover database as db1 till 12:00:00 of 24/11/09
It is obvisous that I will need to restore backup taken at 21:00 of 23/11/09 and apply archive logs till 12:00 of 24/11/09 over it

Since by default RMAN takes latest backup to restore (in our case 21:00 of 24/11/09), How do I tell it to take previous backup to restore (i.e. 21:00 of 23/11/09)

Thanks and Regards,
Chetana
Re: Recovery from Previous Backups(RMAN) [message #429181 is a reply to message #429180] Mon, 02 November 2009 08:01 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Quote:
Since by default RMAN takes latest backup to restore (in our case 21:00 of 24/11/09), How do I tell it to take previous backup to restore (i.e. 21:00 of 23/11/09)

Uncatalog the next one.
Or use UNTIL on the RESTORE command.

Regards
Michel

[Updated on: Mon, 02 November 2009 08:02]

Report message to a moderator

Re: Recovery from Previous Backups(RMAN) [message #429182 is a reply to message #429180] Mon, 02 November 2009 08:05 Go to previous messageGo to next message
Michel Cadot
Messages: 68716
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
By the way, it is an answer I already gave you in a previous topic:

chetanaZ wrote on Tue, 20 October 2009 10:16
...
Thus 'Set Until' must not matter for 'Restore' but for 'Recover' since we can rollback hours of data during recover after completing restore till 17:05:00
...

Michel Cadot wrote on Tue, 20 October 2009 10:50
It matters on restore if you want to restore datafiles from a date before the last backup. In your example, if you want to recover at 16:05 you have to give UNTIL before restore to tell Oracle to search for previous backup otherwise it will take the last one which is too late.

Regards
Michel


Re: Recovery from Previous Backups(RMAN) [message #429193 is a reply to message #429040] Mon, 02 November 2009 08:29 Go to previous message
chetanaZ
Messages: 132
Registered: October 2009
Location: UK
Senior Member
Thanks Michel

For your first reply today :
Unfortunately I am not using 'Recovery Catalog'

Your Second answer exactly satisfies my requirement. Thanks
(donno i could not catch it from last thread)
I assume I will execute following in my case


<copy backup of controlfile taken using 
alter database backup controlfile to trace
<after startup nomount>
SQL> alter session set nls_date_format='dd-mm-yyyy hh24:mi:ss';
SQL> restore database till '24-11-2009 12:00:00';
SQL> recover automatic DATABASE  until time '24-11-2009 
12:00:00'USING BACKUP CONTROLFILE;


This if this looks OK. I have 2 queries

Apart from the controlfile backup taken using 'alter database', I do have rman backup of controlfile as well

1) Do i need to restore controlfile too using condition 'until time' in any of the cases
a) datafile structure is changed after backup on 23/11/09 finished at say 03:00:00 of 24/11/09
b) datafile structure is Not changed after backup on 23/11/09 finished at say 03:00:00 of 24/11/09

Can SCN be used in this case?how I can get it if I do not have access to source database?

Thanks and Regards,
Chetana


Previous Topic: how to restore datafile from multiple backup pieces
Next Topic: daily backup automatically
Goto Forum:
  


Current Time: Fri Nov 22 01:26:07 CST 2024