Skip to Main Content

Breadcrumb

Question and Answer

Connor McDonald

Thanks for the question, Joe.

Asked: October 05, 2022 - 4:01 pm UTC

Last updated: October 10, 2022 - 1:47 am UTC

Version: Oracle Database version 19.16

Viewed 1000+ times

You Asked

I'm currently running a daily backup as
RUN {
RECOVER COPY OF DATABASE WITH TAG 'IMAGE_COPY' UNTIL TIME 'SYSDATE-7';
BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'IMAGE_COPY' DATABASE;
BACKUP DEVICE TYPE DISK TAG 'IMAGE_COPY' ARCHIVELOG ALL NOT BACKED UP DELETE ALL INPUT;
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
}

A copy of all our datafiles are placed on the flash recovery disk group and those files are recovered daily by this rman job.
For example from alert log:
Incremental restore complete of datafile ## to datafile copy +RECOV/......

Our database is about 24TB in size. We would like to have another independent incrementally updated backup that's maintained on another separate set of disks. Is this possible?
Due to this size of the database we would like to have another incrementally updated backup to a different set of disks since this type of backup is very efficient.

We're on version 19.16 of Oracle and using the Multitenant architecture.

and Connor said...

I'm assuming you mean something like this:

1st set of disks:
- 24TB set of files plus incrementals

2nd set of disks:
- 24TB set of files plus incrementals

Then that is just a case of having different tags for each set

If you want a *single* 24TB set of files, and have various databases all sourced from that single set, then I'd be looking at clonedb or sparse snapshots

Rating

  (3 ratings)

Is this answer out of date? If it is, please let us know via a Comment

Comments

A reader, October 07, 2022 - 8:01 pm UTC

Thanks for your reply.

This is the plan:

1st set of disks
24TB set of files plus incrementals stored in RECOV disk group

2nd set of disks
24TB set of files plus incrementals stored in a filesystem /db_backup

Here's the 2nd rman job that I was hoping would take another image copy and place it into /db_backup

RUN {
RECOVER COPY OF DATABASE WITH TAG 'S3_IMAGE_COPY' UNTIL TIME 'SYSDATE-7';
BACKUP INCREMENTAL LEVEL 1 FOR RECOVER OF COPY WITH TAG 'S3_IMAGE_COPY' DATABASE format=/db_backup/<container name>/datafile/%U';
BACKUP DEVICE TYPE DISK TAG 'S3_IMAGE_COPY' ARCHIVELOG ALL NOT BACKED UP DELETE ALL INPUT ;
DELETE NOPROMPT OBSOLETE DEVICE TYPE DISK;
}

I've executed the first IMAGE_COPY rman job and it places the copies in +FRA. It works perfectly and recovers the files daily until I run the S3_IMAGE_COPY job. The S3_IMAGE_COPY does not make data file copies within /db_backup/<container name>/datafile/ but makes another copy in the +FRA.

If I then run IMAGE_COPY job again after the S3_IMAGE_COPY the datafile copies in +FRA from before the S3_IMAGE_COPY are deleted.

This is why I asked if having two image copies to two different set of disks is possible. I certainly can be doing something wrong here.

Our goal is to have two image copies that can be maintained daily, one that goes to the FRA and another to a filesystem.
Connor McDonald
October 10, 2022 - 1:47 am UTC

What happens if you allocate the channel with the format you want? eg

run {
allocate channel c1 device type disk format '/backup/%U';
recover copy of database with tag 'ROLLING';
backup incremental level 1 for recover of copy with tag 'ROLLING' database;
}

Joe, November 05, 2022 - 2:52 pm UTC

Thanks for your latest comment. Sorry for late response on this update. I managed to get around the automatic removal of the 2nd image copy by changing the retention policy from 1 to 2. Now both the image copy on the FRA and the image copy on the 2nd set of disks (filesystem) are working. Only problem now is that when I add a new datafile to a tablespace the daily image copy to FRA is creating 2 images of the file on FRA rather than one in FRA and the other on the 2nd set of disks (filesystem). The RECOVERY_FILE_DEST is FRA so I guess that's telling rman to place the two new image copies of the added datafile on FRA. If I can't find a solution I'll just post a new question on this site. Thank you very much for your help.

More to Explore

Administration

Need more information on Administration? Check out the Administrators guide for the Oracle Database