Incrementally Updated Image File Backup Multiple Locations

backuporacleoracle-11g-r2

With an Incrementally Updated Image File Backup the same script handles both the initial image backups, and the incremental backups that can be applied to the images to bring them up to date. Is there a way to change a parameter or modify this script so that the image files get created in one location and the incrementals get created in another?

A partial solution is to do the inital image file backups, move them to the alternate location and then re-catalog them there. The next run will then create the incremental backup in the original location, but update the image files in the new location. The problem comes when a new datafile is created. The backup will recognize that it doesn't have an image for it and create one, but in the same location as the incrementals. Aside from repeating the move and re-catalog is there a way to have things happen as desired from the start?

If you're wondering why this would be useful, consider that the image backup volume could be snapped and cloned to a new volume on another server for fast refreshes of lower environments. Having the incrementals and images in separate locations reduces the space requirements for the snap/clone.

Backup Command:

BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'MyImageBackup' DATABASE;

Best Answer

No, it is not possible to have this single backup command do the level 0 to a different location than the level 1. It is possible to change the script to determine which files don't have level zero backups and do a separate backup just for those datafiles before running the existing command to the incremental location.