0

Goal

I want to move a database from server A to server B. Both server have the same technology so one way is to shutdown the source database, copy data files,control file, redo logs, parameter file to from A to B and start the database on B. But this will take to long so I will use a method that involves the archive logs. For example I can use dataguard an build a standby on SERVER B and switch to this standby during migration. But for some reasons I don't want to use a standby nor can I access the backup of the A database to restore it on B.

Method

Before RMAN I did this the following way:

  1. Set the database of A in backup mode and copy all data files to a disk attached to the server and unset the backup mode.
  2. Move this disk to B and attache it to it.
  3. Now from time to time archives are transported to B and applied
  4. During the migration the last archives are brought to B and applied and the database is copied.

Of course I can try this with RMAN, too. And instead copying all the archives I can use incremental backups too.

So I do the following:

  1. Make a level 0 backup to a disk attached to server A.
  2. Move the disk to B and restore the database on Server B.
  3. Now from time to time archives are transported to B and applied
  4. During the migration the last archives are brought to B and applied and the database is copied.

I even could apply incremental backup instead of archives except for the last phase but here I am not interested in that.

Problem

My problem is now that the database on A is backed up using incremental backups: 1. On Sunday a level 0 backup is taken 2. on the remaining 6 days a level 1 backup is taken

I want to to copy my level 0 backup for migration on Wednesday. But this messes up the regular backup. Assume I do this level 0 backup on Wednesday morning then the nightly level 1 backup on Wednesday refers to the level 0 backup on this morning and not to the level 1 backup of the previous day as usual. But in case of a restore/recovery Thursday we have a problem, because the disk of the Wednesday level 0 backup is not available anymore. I think the database can be still recovered because the missing time interval can be recovered with archive logs. But I want a solution that does not mess up the regular backup. So the level 1 backup On Wednesday should refer to the level 1 backup on Tuesday.

Solutions

How can I achieve this?

At the moment I see the following way:

I use duplicate from active database to make a copy of the database on A to the disk attached to A. This database must not be opened so that I can recover it with archive logs later. This disk is detached from A and moved to B. Here the datafiles are registered as datafile copies and restored to th server B.

But this needs an additional instance on A so that I can duplicate to this instance.

Another way may be

 BACKUP INCREMENTAL LEVEL 1... FOR RECOVER OF COPY WITH TAG... 

as described here

The manual says:

The BACKUP INCREMENTAL LEVEL 1... FOR RECOVER OF COPY WITH TAG... command does not actually always create a level 1 incremental backup. If there is no level 0 image copy backup of an particular data file, then executing this command creates an image copy backup of the data file on disk with the specified tag instead of creating the level 1 backup.

Each time a data file is added to the database, an image copy of the new data file is created the next time the script runs. The time after that, the first level 1 incremental for that data file is created, and on all subsequent runs the new data file is processed like any other data file.

Tags must be used to identify the incremental level 0 data file copies created for use in this strategy, so that they do not interfere with other backup strategies you implement. If you have multiple incremental backup strategies in effect, RMAN cannot unambiguously create incremental level 1 backups unless you tag level 0 backups.

This sounds good but I actually have to test this.

My question

What method do you propose to get a level 0 online backup that is ignored by the following level 0 backup of the regular backup cycle?

1

I'd use RMAN to DUPLICATE DATABASE TO OTHERDB. Feel free to use one of the related methods that fits your environment/requirements.

References:

  • Thank you for your input. I already mentioned the duplicate method as one of my solutions (I added more details now to make this more clear). Your first link starts with BACKUP DATABASE PLUS ARCHIVELOG. Does this backup interfere with the regular backup (like a level 0 backup as I suspect) or is it ignored by the level 1 backups? – miracle173 Oct 5 '18 at 0:49
  • I looked up the manual and it says "A full backup has no effect on subsequent incremental backups and is not considered a part of any incremental backup strategy. A full image copy backup can be incrementally updated, however, by applying incremental backups with the RECOVER command.A full backup has no effect on subsequent incremental backups and is not considered a part of any incremental backup strategy. A full image copy backup can be incrementally updated, ...." a FULL backup was what I was looking for. – miracle173 Oct 5 '18 at 0:54
  • I upvoted your answer but I didn't accept it because it did not contain the relevant details, I posted this in my own answer. – miracle173 Oct 5 '18 at 1:16
0

A FULL-Backup does not interfere with the regular backup.

From the description of the BACKUP command in the "Database Backup and Recovery Reference" of "Oracle Database Online Documentation 11g Release 2 (11.2)" for the backup operand FULL:

Creates a backup of all blocks of data files included in the backup. FULL is the opposite of INCREMENTAL. RMAN makes full backups by default if neither FULL nor INCREMENTAL is specified. A full backup has no effect on subsequent incremental backups and is not considered a part of any incremental backup strategy. A full image copy backup can be incrementally updated, however, by applying incremental backups with the RECOVER command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.