0

I'm planning to setup a test server with production data. The intended actions are, making a cold backup & restoring it in the Test server.

The cold backup routine is

run
{
shutdown immediate;
startup mount;
backup database;
}

As I am restoring a cold backup, should be bothered about losing some data? The database is on Archive logging mode. Should I do a recover media as part of the restore process?

  • If you can afford to shutdown your database, you should have no problems or need of recovery. You may want to reopen your database after the backup though, unless it's rarely used. – Gerard H. Pille Mar 10 '18 at 12:01
  • When your database is in archive log mode you always need recovery. – wolfrevokcats Mar 10 '18 at 12:07
  • @wolfrevokcats2, When I tried to include recover database, the media recoery is aborting asking for archive sequence that doesn't exist. Please note, the restore is made against a cold backup. Are you sure I should do the media recovery? – Rajesh Thampi Mar 10 '18 at 12:11
  • @wolfrevokcats That is not true. A cold backup does not require recovery, it is consistent already. Having archivelog mode turned on changes nothing. – Balazs Papp Mar 10 '18 at 12:22
  • @RajeshThampi How did you make the cold backup of archivelog mode database? – wolfrevokcats Mar 10 '18 at 12:31
0

SHUTDOWN

IMMEDIATE

Does not wait for current calls to complete or users to disconnect from the database.

Further connects are prohibited. The database is closed and dismounted. The instance is shutdown and no instance recovery is required on the next database startup.

SHUTDOWN

ABORT

Performs an inconsistent shutdown of the target instance, with the following consequences:

All current client SQL statements are immediately terminated.

Uncommitted transactions are not rolled back until next startup.

All connected users are disconnected.

Instance recovery is performed on the database at next startup.

IMMEDIATE

Performs an immediate, consistent shutdown of the target database, with the following consequences:

Current client SQL statements being processed by the database are allowed to complete.

Uncommitted transactions are rolled back.

All connected users are disconnected.

A cold backup is consistent already, requires no further recovery. All you need to do is open the restored database with:

alter database open resetlogs;

You will have your database as it existed when you took the cold backup. If you need a state newer than that, only then you need to recover further the restored database.

  • I wanted to cross verify it, hence started the thread. I managed to restore a hot backup from Linux to Windows (11.2.0.4) and successfully applied media recovery, however had to recreate control file for redo logs. I am a noob with recovery, and wanted to make sure that am not challenging data consistency. I believe cold backup is the best bargain. – Rajesh Thampi Mar 10 '18 at 13:07
  • @RajeshThampi That is a different story. Restore From Windows To Linux using RMAN Fails (Doc ID 2003327.1) - Note, redo application is not supported between Linux and Windows except with a standby database. This means that the backup must a cold (consistent) backup, which requires no redo application. – Balazs Papp Mar 10 '18 at 13:09
  • @BalazsPappa, Well, I know the redo logs cannot be restored, however my last attempt did recover the media successfully, or that's what I assume from the prompts the restore process has provided me. If you have sometime, please have a look at [link] (windows7bugs.wordpress.com/2018/03/03/…) & tell me whether the media recovery was successful. As I mentioned, I am a noob with RMAN and I've done it for learning purpose only. – Rajesh Thampi Mar 10 '18 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.