Thursday, September 4, 2014

RMAN Tape Backup Script

RMAN Full Backup :- Using this scripts you can take full database backup.

RUN
 {
ALLOCATE CHANNEL OCH1 TYPE 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)' FORMAT 'ora_d%d_T%T_%s_%p.bak';
BACKUP
INCREMENTAL LEVEL 0
DATABASE;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP ARCHIVELOG ALL FORMAT 'RMAN_ARCHIVE_%d_%t_%s_%p_%U.arch' DELETE INPUT;
BACKUP CURRENT CONTROLFILE;
BACKUP SPFILE;
 }

RMAN Incremental Backup :- Using this scripts you can take Incremental database backup.

RUN
 {
ALLOCATE CHANNEL OCH1 TYPE 'SBT_TAPE' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)' FORMAT 'ora_d%d_T%T_%s_%p.bak';
BACKUP
INCREMENTAL LEVEL 1
DATABASE;
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP ARCHIVELOG ALL FORMAT 'RMAN_ARCHIVE_%d_%t_%s_%p_%U.arch' DELETE INPUT;
BACKUP CURRENT CONTROLFILE;
BACKUP SPFILE;

 }

No comments:

Post a Comment