This discussion is archived
7 Replies Latest reply: Oct 9, 2013 2:00 PM by Levi-Pereira RSS

Differential Incremental Backup for RAC

896971 Newbie
Currently Being Moderated

I have inherited a two-node RAC (11r2 on RHEL 5.8 tikanga) with a shared network directory that is to be used as the backup location. This is the current backup strategy.

 

RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name TESTdb are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;  # default
CONFIGURE BACKUP OPTIMIZATION OFF;  # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK;  # default
CONFIGURE CONTROLFILE AUTOBACKUP OFF;  # default
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';  # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;  # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;  # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;  # default
CONFIGURE MAXSETSIZE TO UNLIMITED;  # default
CONFIGURE ENCRYPTION FOR DATABASE OFF;  # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128';  # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;  # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE;  # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_testdb1.f';  # default

 

The above is for node 1, on node 2 it is identical except for line 17 (it references "_testdb2.f").

The backup script is below.

 

run
{
recovery copy of database with tag 'ORA_OEM_LVL0_TESTdb_PRIM' until time 'SYSDATE-7';
backup check logical incremental level 1 cumulative copies=1 for recover of copy with tag 'ORA_OEM_LVL0_TESTdb_PRIM' database;
backup check logical archivelog all tag 'ORA_OEM_ARCH_TESTdb_PRIM';
}
allocate channel for maintenance device disk type;
crosscheck backupset;
crosscheck archivelog all;
delete noprompt obsolete device type disk;

 

I am a relatively new DBA, but I think the above strategy may not even be functioning as the "db_recovery_file_dest" in SQLPLUS references +FRA (not the shared network directory) and both locations (both the FRA directories) and the shared network directory have no large amounts of data in them.  I am thinking that the prior owners of this RAC may not have had adequate DBA support.

 

At any rate, I was thinking of altering the configuration as such:

 

RMAN> show all;
using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name TESTdb are:
CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;
CONFIGURE BACKUP OPTIMIZATION ON; 
CONFIGURE DEFAULT DEVICE TYPE TO DISK;  # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';  # default
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/SharedNetworkDrive/ora_df%t_s%s_s%p';
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET;  # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;  # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;  # default
CONFIGURE MAXSETSIZE TO UNLIMITED;  # default
CONFIGURE ENCRYPTION FOR DATABASE OFF;  # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128';  # default
CONFIGURE COMPRESSION ALGORITHM 'HIGH' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE;  # default
CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/u01/app/oracle/product/11.2.0/dbhome_1/dbs/snapcf_testdb1.f';  # default

 

RUN
{
RECOVER COPY OF DATABASE WITH TAG 'incr_update' UNTIL TIME 'SYSDATE - 7';
BACKUP INCREMENTAL LEVEL 1  FOR RECOVER OF COPY WITH TAG 'incr_update' DATABASE PLUS ARCHIVELOG;
DELETE ARCHIVELOG ALL;
}

 

I'm sure I'm missing some things in my backup strategy. Any advice is greatly appreciated!

 

Thank you

 

p.s.--yes, we do have a license for compression

  • 1. Re: Differential Incremental Backup for RAC
    Anar Godjaev Expert
    Currently Being Moderated

    HI,

     

    As an 8 years old DBA I would say that  it is really a good strategy. go  on

     

    Thank you

  • 2. Re: Differential Incremental Backup for RAC
    Hemant K Chitale Oracle ACE
    Currently Being Moderated

    >both locations (both the FRA directories) and the shared network directory have no large amounts of data in them

     

    Why not do a LIST BACKUP  from the RMAN command line to see where the backups are ?

    Also LIST COPY OF DATAFILE 1  (at least the first datafile in the system tablespace)

     

    >DELETE ARCHIVELOG ALL;

    Bad idea.  Between the execution of "BACKUP INCREMENTAL LEVELFOR RECOVER OF COPY WITH TAG 'incr_update' DATABASE PLUS ARCHIVELOG; "

    and the "DELETE ARCHIVELOG ALL",  Oracle might have generated one or more archivelogs -- the DELETE would delete them without their having been backed up.

     

     

    Hemant K Chitale

  • 3. Re: Differential Incremental Backup for RAC
    Levi-Pereira Guru
    Currently Being Moderated

    TIP:

    RAC 11.2 and later,  the snapshot controlfile location MUST be in a shared file system that will be accessible from all the nodes.


    RAC BACKUP FAILS WITH ORA-00245: CONTROL FILE BACKUP OPERATION FAILED [ID 1268725.1]


    Configuring Recovery Manager and Archiving

  • 4. Re: Differential Incremental Backup for RAC
    896971 Newbie
    Currently Being Moderated

    HemantKChitale wrote:

     

    >both locations (both the FRA directories) and the shared network directory have no large amounts of data in them

     

    Why not do a LIST BACKUP  from the RMAN command line to see where the backups are ?

    Also LIST COPY OF DATAFILE 1  (at least the first datafile in the system tablespace)

     

    >DELETE ARCHIVELOG ALL;

    Bad idea.  Between the execution of "BACKUP INCREMENTAL LEVELFOR RECOVER OF COPY WITH TAG 'incr_update' DATABASE PLUS ARCHIVELOG; "

    and the "DELETE ARCHIVELOG ALL",  Oracle might have generated one or more archivelogs -- the DELETE would delete them without their having been backed up.

     

     

    Hemant K Chitale

     

    There were no backups when I performed a LIST BACKUP. I forgot to mention that.

     

    Good point about DELETE ARCHIVELOG ALL. Would your suggestion be to replace it with DELETE NOPROMPT OBSOLETE? Would I need to perform a crosscheck beforehand or would Oracle already know that from running the backup?

     

    Thanks

  • 5. Re: Differential Incremental Backup for RAC
    896971 Newbie
    Currently Being Moderated

    Levi-Pereira wrote:

     

    TIP:

    RAC 11.2 and later,  the snapshot controlfile location MUST be in a shared file system that will be accessible from all the nodes.


    RAC BACKUP FAILS WITH ORA-00245: CONTROL FILE BACKUP OPERATION FAILED [ID 1268725.1]


    Configuring Recovery Manager and Archiving

     

    Thanks for the tip! So the CONFIGURE line should read something like:

     

    CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/SharedNetworkDrive/snapcf_testdb1.f';

     

    Is this correct?

  • 6. Re: Differential Incremental Backup for RAC
    Levi-Pereira Guru
    Currently Being Moderated

    If  "/SharedNetworkDrive/" is accessible (r/w) in all nodes where your database have instance. Yes is correct.

  • 7. Re: Differential Incremental Backup for RAC
    Levi-Pereira Guru
    Currently Being Moderated

    Good point about DELETE ARCHIVELOG ALL. Would your suggestion be to replace it with DELETE NOPROMPT OBSOLETE? Would I need to perform a crosscheck beforehand or would Oracle already know that from running the backup?

     

    1. CONFIGURE ARCHIVELOG DELETION POLICY TO BACKED UP 1 TIMES TO DISK;
    2. BACKUP INCREMENTAL LEVELFOR RECOVER OF COPY WITH TAG 'incr_update' DATABASE PLUS ARCHIVELOG; 
    3. DELETE ARCHIVELOG ALL;


    As you setup  CONFIGURE ARCHIVELOG DELETION POLICY  RMAN will not allow delete archivelog until archivelog be backed up 1 time to disk.

    But, HemantKChitale have a good point, if for some reason someone clear that configuration you probably will DELETE ARCHIVELOG without backup, making your backup be inconsistent.

    So, is recommended you "BACKUP INCREMENTAL LEVELFOR RECOVER OF COPY WITH TAG 'incr_update' DATABASE PLUS ARCHIVELOG DELETE INPUT" or "BACKUP ARCHIVELOG ALL DELETE INPUT";

    This will prevent you delete archivelogs without backup, because RMAN will delete only ARCHIVELOGS backed up.

     


Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points