Customers whose databases are of huge size and if the RMAN backup size is about 2TB or more and when there is no enough space to keep all of the backup files in a single mountpoint , we spread them in 2 or 3 different mount points.
Question is "How do we restore when the RMAN backup files are in different location" ?
A simple solution to this would be to create softlinks to the backup pieces from location B in the location A :
In my case, the database Rman Backup files are spread across 2 different mount points in the Target ( /u02 & /u03) and as we cannot pass two locations to the Rman Duplicate command ... I’ve created softlinks in /u02 to the backup pieces in /u03 and passed /u02 as a single backup location to RMAN script.
Example:
cd /u02/backup/location1
ln -s /u03/backup/location2/PROD_df_full_143926_1.bak PROD_df_full_143926_1.bak
ln -s /u03/backup/location2/PROD_df_full_143927_1.bak PROD_df_full_143927_1.bak
ln -s /u03/backup/location2/PROD_df_full_143929_1.bak PROD_df_full_143929_1.bak
ln -s /u03/backup/location2/PROD_df_full_143936_1.bak PROD_df_full_143936_1.bak
ln -s /u03/backup/location2/PROD_df_full_143935_1.bak PROD_df_full_143935_1.bak
Now, It would look like :
cd /u02/backup/location1
ls -lrt
FINP01_df_full_143925_6.bak
FINP01_df_full_143930_6.bak
FINP01_df_full_143931_4.bak
FINP01_df_full_143931_2.bak
FINP01_df_full_143931_3.bak
FINP01_df_full_143926_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143926_1.bak
FINP01_df_full_143927_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143927_1.bak
FINP01_df_full_143929_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143929_1.bak
FINP01_df_full_143936_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143936_1.bak
FINP01_df_full_143935_1.bak -> /u03/backup/rbackup/FINS01/FINP01_df_full_143935_1.bak
Now, pass '/u02/backup/location1' as the backup location to RMAN duplicate command :
DUPLICATE TARGET DATABASE to <TARGETDB> BACKUP LOCATION '/u02/backup/location1' NOFILENAMECHECK ;