By default, when we are using ASM with a Flash Recovery Area configured, backups to disk will go to the “backupset” subdirectory – unless we use the FORMAT clause while taking the backup to point the backups to another location on disk.
When we try to duplicate a database which is hosted on an ASM storage to a conventional O/S file system, the restore will fail as it will look for the ASM diskgroups where the backup was taken on the target node as well.
We will see an error like …..
channel ORA_AUX_DISK_1: reading from backup piece +DBATEAM/bwdba/backupset/2009_08_25/nnndf0_tag20090825t131155_0.388.695826727
channel ORA_AUX_DISK_1: ORA-19870: error while restoring backup piece +DBATEAM/bwdba/backupset/2009_08_25/nnndf0_tag20090825t131155_0.388.695826727
ORA-19505: failed to identify file “+DBATEAM/bwdba/backupset/2009_08_25/nnndf0_tag20090825t131155_0.388.695826727”
ORA-17503: ksfdopn:2 Failed to open file +DBATEAM/bwdba/backupset/2009_08_25/nnndf0_tag20090825t131155_0.388.695826727
ORA-15001: diskgroup “DBATEAM” does not exist or is not mounte
failover to previous backup
In this case we will need to use the BACKUPSET clause of the BACKUP command to relocate that backup from the ASM storage to a O/S file system. We then ftp this backupset to the target node ensuring that the same directory file structure is available on the target node as compared to the source node where the ASM disk backup was restored. We can then proceed as normal with the RMAN Duplicate database procedure.
RMAN> list backup of database; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 14 Full 1.40G DISK 00:00:47 26-AUG-09 BP Key: 14 Status: AVAILABLE Compressed: NO Tag: TAG20090826T102022 Piece Name: +DBATEAM/bwdba/backupset/2009_08_26/nnndf0_tag20090826t102022_0.397.695902837 List of Datafiles in backup set 14 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/system.256.695305997 2 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/sysaux.257.695305999 3 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/undotbs1.258.695305999 4 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/users.259.695305999 5 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/example.267.695306155 6 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/undotbs2.268.695306391
RMAN> backup device type disk format '/u01/oracle/backup/bwdba_bkp.%u' 2> backupset 14 3> ; Starting backup at 26-AUG-09 allocated channel: ORA_DISK_1 channel ORA_DISK_1: SID=108 instance=bwdba1 device type=DISK input backup set count=15 STAMP=695902823 creation_time=26-AUG-09 channel ORA_DISK_1: starting piece 1 at 26-AUG-09 channel ORA_DISK_1: backup piece +DBATEAM/bwdba/backupset/2009_08_26/nnndf0_tag20090826t102022_0.397.695902837 piece handle=/u01/oracle/backup/bwdba_bkp.0fknl8j7 comment=NONE channel ORA_DISK_1: finished piece 1 at 26-AUG-09 channel ORA_DISK_1: backup set complete, elapsed time: 00:00:25 Finished backup at 26-AUG-09
We will see now that the backup location has changed
RMAN> list backup of database; List of Backup Sets =================== BS Key Type LV Size Device Type Elapsed Time Completion Time ------- ---- -- ---------- ----------- ------------ --------------- 14 Full 1.40G DISK 00:00:47 26-AUG-09 BP Key: 18 Status: AVAILABLE Compressed: NO Tag: TAG20090826T102022 Piece Name: /u01/oracle/backup/bwdba_bkp.0fknl8j7 List of Datafiles in backup set 14 File LV Type Ckp SCN Ckp Time Name ---- -- ---- ---------- --------- ---- 1 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/system.256.695305997 2 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/sysaux.257.695305999 3 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/undotbs1.258.695305999 4 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/users.259.695305999 5 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/example.267.695306155 6 Full 2765425 26-AUG-09 +DBATEAM/bwdba/datafile/undotbs2.268.695306391
Last Update: August 26, 2009
A little further research and experimentation, and I found the answer … the SET NEWNAME FOR DATAFILE and SWITCH DATAFILE commands. Thanks for getting me started on this path, though – problem solved! 🙂