Thursday, 11 August 2011

Rman backup using standby database

Rman backup using standby database

Some companies want to schedule backup from the standby database to reduce the load in the production environment. Infact standby serve this purpose without any additional effort.

Backup of standby database is similar to production. To take consistent backup we need to cancel the recovery mode and bring the database in mount mode, otherwise the backup will be in inconsistent mode.

The rman user id should be part of sysdba

$ rman target rman/oracle@db1 catalog rmanUser/passwd@catalog
RMAN> backup database;
RMAN> backup archivelog all;
Note:

1.Both the primary database and standby database should use the same recovery catalog
2.The control file and SPFILE must be backed up on the primary database. 
3. It is not advisable to run the backup from both the standby and primary database.
    When you run delete obsolete ,you may get the below error if backup has been taken from both primary and standby databases.

             RMAN-06207: WARNING: 1 objects could not be deleted for DISK channel(s) due
             RMAN-06208: to mismatched status. Use CROSSCHECK command to fix status
             RMAN-06210: List of Mismatched objects

4. if at all you would like to take backup from both the primary and standby,Use a different recovery catalog schema for each of these two targets.  still you need to take the controlfile backup from the primary database.

5 comments:

  1. hi jey ,

    few comments after reading oracle doc....

    1. standby should not be explicitly registered with the catalog, only primary db should be registered.stdby db is restired implicitly with
    configure for db unique name configuration setting of rman.

    2. till 9i image copies and non rman backup of standby database cannot be used to restore the primary site, not sure about 11g.

    3. in 11g doc it says to configure autobackup of controlfile to on on standby database. which means controlfile backed up on standby?
    May be with configure for db unique name, it automatically backups primary controlfile and not standby.


    In 11.2 With configure for db unique name setting we can connect only to recovery catalog and dont need to explicitly set
    target database while taking backups.

    ReplyDelete
  2. Hi,
    Iam new to standby RMAN backup and restore concept , i need to take backup of standby to tape is there any configuration i need to set ?

    - My standby in mount stage the how the backup will goes to tape normaly?

    - Do we need to cancel recovery before standb y backup as u said?

    ReplyDelete
  3. Hi,
    Iam new to standby RMAN backup and restore concept , i need to take backup of standby to tape is there any configuration i need to set ?

    - My standby in mount stage the how the backup will goes to tape normaly?

    - Do we need to cancel recovery before standb y backup as u said?

    ReplyDelete
  4. Hi,
    Iam new to standby RMAN backup and restore concept , i need to take backup of standby to tape is there any configuration i need to set ?

    - My standby in mount stage the how the backup will goes to tape normaly?

    - Do we need to cancel recovery before standb y backup as u said?

    ReplyDelete
  5. As for #3 if your going to run backups from both primary and secondary you just need to make sure that it is a common mount point. I put this on common mount nfs mount point on a separate system or a storage appliance we use for backups.

    ReplyDelete

ZFS

Public Cloud tools comparison