Home » RDBMS Server » Backup & Recovery » rman restore/recovery to previous cold backups (oracle 11g / Solaris 10)
rman restore/recovery to previous cold backups [message #593010] Tue, 13 August 2013 09:46 Go to next message
smac
Messages: 11
Registered: August 2013
Junior Member
My scenario is:
database is in archivelog mode.
I run DLY cold backups including controlfile & archivelogs and keep 3 gens of backups and archivelogs to 3 days also.
What is the correct procedure to restore back to an old cold backup.
Database is backed up Mon,Tue,Wed on Thur we require to bring database back to Tuesday DLY security.

I have tried:
startup mount
restore database from tag 'DLYTUE'
recover database

( this just rolls forward on all archive logs once it restores datafiles, not getting to point to alter database open resetlogs.)

Next tried to :

recover database archivelog tag 'DLYTUE'
( same outcome )


What is the correct rman procedure including should I remove old archive logs from working OS directory ?
Aslo need to know once I restore back and open database to TUE security how do you tidy up the archive logs and dumps which are no longer require ie: weds..

I have read about using the set until time option but how to I get obsolute time from when cold backup completed if this is the correct procedure.

thanks
Re: rman restore/recovery to previous cold backups [message #593013 is a reply to message #593010] Tue, 13 August 2013 09:51 Go to previous messageGo to next message
BlackSwan
Messages: 23054
Registered: January 2009
Senior Member
>What is the correct procedure to restore back to an old cold backup.

Testing, testing, testing & actually documenting what works!

With a correct & complete cold backup, after the file restore is completed then all that is required is STARTUP.
The database won't know that it is actually a copy or what was done after the previous SHUTDOWN IMMEDIATE
Re: rman restore/recovery to previous cold backups [message #593014 is a reply to message #593010] Tue, 13 August 2013 09:53 Go to previous messageGo to next message
John Watson
Messages: 4802
Registered: January 2010
Location: Global Village
Senior Member
Welcome to the forum. Please read our OraFAQ Forum Guide and PLEASE read How to use [code] tags and make your code easier to read

Set the UNITL TIME to what date/time you want to restore and recover up to, and RMAN will work out the rest.
Re: rman restore/recovery to previous cold backups [message #593095 is a reply to message #593013] Wed, 14 August 2013 02:02 Go to previous messageGo to next message
smac
Messages: 11
Registered: August 2013
Junior Member
Not really useful Black Swan, its through testing testing testing I have come to forums for an answer and if it was as simple as just startup i would not be looking for advice from senior DBA's, but thanks for trying.

Re: rman restore/recovery to previous cold backups [message #593097 is a reply to message #593014] Wed, 14 August 2013 02:04 Go to previous messageGo to next message
smac
Messages: 11
Registered: August 2013
Junior Member
John my next test is using the UNTIL TIME and then just calling restore database / recover database and letting RMAN do the hard work, BUT how do you find the obsolute time from when cold backup completed or do you work from start of cold backup ?
If you can expand on this it would be very useful.
thanks
Re: rman restore/recovery to previous cold backups [message #593100 is a reply to message #593097] Wed, 14 August 2013 02:18 Go to previous messageGo to next message
Michel Cadot
Messages: 59775
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If you want to just restore the cold backup you don't need to recover and until time: just restore and open resetlogs.

If you want to restore and recover to another time than the backup, you have to set UNTIL TIME/SEQUENCE/SCN. You can find the SCN with the LIST BACKUP command.

Regards
Michel
Re: rman restore/recovery to previous cold backups [message #593102 is a reply to message #593097] Wed, 14 August 2013 02:41 Go to previous messageGo to next message
John Watson
Messages: 4802
Registered: January 2010
Location: Global Village
Senior Member
smac wrote on Wed, 14 August 2013 08:04
John my next test is using the UNTIL TIME and then just calling restore database / recover database and letting RMAN do the hard work, BUT how do you find the obsolute time from when cold backup completed or do you work from start of cold backup ?
If you can expand on this it would be very useful.
thanks
Surely your business requirement is to restore/recover the database to the state it was in at a particular time? When your backup was accomplished is irrelevant to this. If you are not concerned with any particular time, then Michel and BS have already answered. But their technique will not work when you make open backups.
Re: rman restore/recovery to previous cold backups [message #593104 is a reply to message #593102] Wed, 14 August 2013 02:56 Go to previous messageGo to next message
smac
Messages: 11
Registered: August 2013
Junior Member
Guy's, I am confused not.
When I run my cold backups including archivelogs it gives me options to either retore back to the cold backup or restore and rollforward to a point in time.
If I just want to go back to the cold backup point is it correct then I just call:
startup mount
restore datbase from tag 'DLYTUE'
shutdown immediate
startup

Not sure john on your statement with this will not work with open backups

I think maybe I am causing problems as I tried to call recover database until cancel from RMAN rather than SQL.
If I do this then CANCEL I should be able to '.... open resetlogs' from SQL.

[Updated on: Wed, 14 August 2013 03:48]

Report message to a moderator

Re: rman restore/recovery to previous cold backups [message #593119 is a reply to message #593104] Wed, 14 August 2013 04:47 Go to previous messageGo to next message
Michel Cadot
Messages: 59775
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
startup mount;
restore database from tag 'DLYTUE';
alter database open resetlogs;

Regards
Michel

[Edit: typo]

[Updated on: Wed, 21 August 2013 08:27]

Report message to a moderator

icon7.gif  Re: rman restore/recovery to previous cold backups [message #593852 is a reply to message #593119] Wed, 21 August 2013 08:26 Go to previous message
maksydba
Messages: 1
Registered: August 2013
Location: Bangladesh
Junior Member
thanks
Previous Topic: unrecognised punctuation symbol
Next Topic: LRM-00101: unknown parameter name 'partition_options'
Goto Forum:
  


Current Time: Tue Nov 25 23:50:52 CST 2014

Total time taken to generate the page: 0.32510 seconds