Commands for Oracle back up - Daily and weekly

Take the following steps to perform backups directly to tape, by default:

   1.  Connect RMAN to the standby database (as the target database) and recovery catalog.
   2.  Execute the CONFIGURE command as follows:

      CONFIGURE DEFAULT DEVICE TYPE TO SBT;

In this scenario, full backups are taken weekly, with incremental backups taken daily on the standby database.

Commands for Daily Backups Directly to Tape

Take the following steps to perform daily backups directly to tape:

   1. Connect RMAN to the standby database (as target database) and to the recovery manager.

   2. Execute the following RMAN commands:

      RESYNC CATALOG FROM DB_UNIQUE_NAME ALL;
      BACKUP AS BACKUPSET INCREMENTAL LEVEL 1 DATABASE PLUS ARCHIVELOG;
      DELETE ARCHIVELOG ALL;

These commands resynchronize the information from all other databases in the Data Guard environment. They also create a level 1 incremental backup of the database, including all archived logs. On the first day this script is run, if no level 0 backups are found, then a level 0 backup is created.

The DELETE ARCHIVELOG ALL command is necessary only if all archived log files are not in a flash recovery area.


Commands for Weekly Backups Directly to Tape

One day a week, take the following steps to perform a weekly backup directly to tape:

   1. Connect RMAN to the standby database (as target database) and to the recovery catalog.
   2. Execute the following RMAN commands:

      BACKUP AS BACKUPSET INCREMENTAL LEVEL 0 DATABASE PLUS ARCHIVELOG;
      DELETE ARCHIVELOG ALL;

These commands resynchronize the information from all other databases in the Data Guard environment, and create a level 0 database backup that includes all archived logs.

The DELETE ARCHIVELOG ALL command is necessary only if all archived log files are not in a flash recovery area.

Post a Comment

0 Comments