geodin
asked on
rman restore from full backupset
My question is how, or can, I restore a database to another host if given only a full backup from say the 14th?
When I run restore it fails looking for some files, error:
archive log thread 1 sequence 5178 is already on disk as file /u02/oradata/flash_recover y_area/APP N/archivel og/2009_05 _20/o1_mf_ 1_5178_519 n6p2s_.arc
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=5930
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=5931
channel ORA_DISK_1: reading from backup piece /u02/oradata/flash_recover y_area/fla sh_recover y_area/APP N/backupse t/2009_05_ 15/o1_mf_a nnnn_TAG20 090515T003 046_50svzs 4f_.bkp
channel ORA_DISK_1: restored backup piece 1
piece handle=/u02/oradata/flash_ recovery_a rea/flash_ recovery_a rea/APPN/b ackupset/2 009_05_15/ o1_mf_annn n_TAG20090 515T003046 _50svzs4f_ .bkp tag=TAG20090515T003046
channel ORA_DISK_1: restore complete, elapsed time: 00:02:38
archive log filename=/u02/oradata/flas h_recovery _area/APPN /archivelo g/2009_05_ 21/o1_mf_2 _5930_51b0 6gp0_.arc thread=2 sequence=5930
archive log filename=/u02/oradata/flas h_recovery _area/APPN /archivelo g/2009_05_ 20/o1_mf_1 _5178_519n 6p2s_.arc thread=1 sequence=5178
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas h_recovery _area/APPN /archivelo g/2009_05_ 21/o1_mf_2 _5930_51b0 6gp0_.arc recid=17338 stamp=687410571
archive log filename=/u02/oradata/flas h_recovery _area/APPN /archivelo g/2009_05_ 21/o1_mf_2 _5931_51b0 bcvy_.arc thread=2 sequence=5931
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas h_recovery _area/APPN /archivelo g/2009_05_ 21/o1_mf_2 _5931_51b0 bcvy_.arc recid=17339 stamp=687410592
unable to find archive log
archive log thread=2 sequence=5932
RMAN-00571: ========================== ========== ========== ========== ===
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ========================== ========== ========== ========== ===
RMAN-03002: failure of recover command at 05/21/2009 03:26:48
RMAN-06054: media recovery requesting unknown log: thread 2 seq 5932 lowscn 1070524268
I connect to rman target / and have tried running the following scripts run:
run{ set until sequence 5931;
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}
I tried running without specifying "set until" hoping rman was smart enough to restore to the last available scn in the backup sets but it failed as it tried to roll to the current date.
I tried running specifying a "set until" time that was in the middle of the time frame the backsets where written to disk but this failed as well.
When I run restore it fails looking for some files, error:
archive log thread 1 sequence 5178 is already on disk as file /u02/oradata/flash_recover
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=5930
channel ORA_DISK_1: restoring archive log
archive log thread=2 sequence=5931
channel ORA_DISK_1: reading from backup piece /u02/oradata/flash_recover
channel ORA_DISK_1: restored backup piece 1
piece handle=/u02/oradata/flash_
channel ORA_DISK_1: restore complete, elapsed time: 00:02:38
archive log filename=/u02/oradata/flas
archive log filename=/u02/oradata/flas
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas
archive log filename=/u02/oradata/flas
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas
unable to find archive log
archive log thread=2 sequence=5932
RMAN-00571: ==========================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ==========================
RMAN-03002: failure of recover command at 05/21/2009 03:26:48
RMAN-06054: media recovery requesting unknown log: thread 2 seq 5932 lowscn 1070524268
I connect to rman target / and have tried running the following scripts run:
run{ set until sequence 5931;
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}
I tried running without specifying "set until" hoping rman was smart enough to restore to the last available scn in the backup sets but it failed as it tried to roll to the current date.
I tried running specifying a "set until" time that was in the middle of the time frame the backsets where written to disk but this failed as well.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have run:
run{ set until time "to_date('2009-05-13 23:59:59','YYYY-MM-DD HH24:MI:SS')";
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}
Whichs seems to have run well until it got to the open resetlogs, rman output:
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas h_recovery _area/APPN /archivelo g/2009_05_ 21/o1_mf_2 _5916_51bx jzt6_.arc recid=17343 stamp=687440609
archive log filename=/u02/oradata/flas h_recovery _area/APPN /archivelo g/2009_05_ 21/o1_mf_2 _5917_51bx om68_.arc thread=2 sequence=5917
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas h_recovery _area/APPN /archivelo g/2009_05_ 21/o1_mf_1 _5173_51bx oos8_.arc recid=17354 stamp=687440702
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas h_recovery _area/APPN /archivelo g/2009_05_ 21/o1_mf_2 _5917_51bx om68_.arc recid=17355 stamp=687440711
media recovery complete, elapsed time: 00:28:18
Finished recover at May 21 2009 12:14:04
RMAN-00571: ========================== ========== ========== ========== ===
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ========================== ========== ========== ========== ===
RMAN-03002: failure of alter db command at 05/21/2009 12:14:06
ORA-00344: unable to re-create online log '/u02/oradata/appn/log01/r edo01_01.l og'
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
RMAN> **end-of-file**
What can I do from here?
Thanks,
Geodin
run{ set until time "to_date('2009-05-13 23:59:59','YYYY-MM-DD HH24:MI:SS')";
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}
Whichs seems to have run well until it got to the open resetlogs, rman output:
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas
archive log filename=/u02/oradata/flas
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas
channel default: deleting archive log(s)
archive log filename=/u02/oradata/flas
media recovery complete, elapsed time: 00:28:18
Finished recover at May 21 2009 12:14:04
RMAN-00571: ==========================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ==========================
RMAN-03002: failure of alter db command at 05/21/2009 12:14:06
ORA-00344: unable to re-create online log '/u02/oradata/appn/log01/r
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 2: No such file or directory
RMAN> **end-of-file**
What can I do from here?
Thanks,
Geodin
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
That was it, the log<n> directory did not exist. I created them then reran the alter database open resetlogs; and the database is up and open. THANKS!
I am just having users verify before I close this question.
Doing a little research I guess I didn't need the switch datafile statement, more for restoring from a different incarnation. I'll take that out if I need to perform this again.
Thanks,
Geodin
I am just having users verify before I close this question.
Doing a little research I guess I didn't need the switch datafile statement, more for restoring from a different incarnation. I'll take that out if I need to perform this again.
Thanks,
Geodin
Great, glad to help! Always good to see the database open. :)
Yes, the RMAN switch command switches the current controlfile over to the "new" paths, but I would not include it
because it can affect the RMAN catalog when used, though in this case I would assume it has no-effect, you never know.
Yes, the RMAN switch command switches the current controlfile over to the "new" paths, but I would not include it
because it can affect the RMAN catalog when used, though in this case I would assume it has no-effect, you never know.
ASKER
But I am curious about how to restore with just a backupset and no prod server to locate SCN, log sequence, etc. and if there are no archive logs on tape. Shouldn't a full backupset have everything needed to recover?