Thursday, June 1, 2017

RMAN backup command example

RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT   "/backup/rman/full_devdb_%u_%s_%p" MAXPIECESIZE 2048 M;

RMAN> BACKUP DATABASE;
RMAN> BACKUP ARCHIVELOG ALL;
RMAN> BACKUP DATABASE PLUS ARCHIVELOG;
RMAN> BACKUP AS BACKUPSET DATABASE
RMAN> BACKUP AS COMPRESSED BACKUPSET DATABASE;
RMAN> BACKUP AS BACKUPSET DATABASE PLUS ARCHIVELOG;
RMAN>  BACKUP FORMAT '/u03/TEST/%d_DB_%T_%u_s%s_p%p' DATABASE PLUS ARCHIVELOG FORMAT '/u03/TEST/%d_ARC_%T_%u_s%s_p%p';
RMAN> BACKUP FORMAT '/u03/TEST/%d_DB_%T_%u_s%s_p%p' DATABASE CURRENT CONTROLFILE FORMAT '/u03/TEST/%d_CTR_%T_%u' SPFILE FORMAT '/u03/TEST/%d_S_%T_%u' PLUS ARCHIVELOG FORMAT '/u03/TEST/%d_ARC_%T_%u_s%s_p%p';
RMAN> BACKUP AS BACKUPSET TABLESPACE PRD01;
RMAN> BACKUP AS BACKUPSET TAG 'WEEEKLY_PRD01_TBLS_BK_ONLY' TABLESPACE PRD01;
RMAN> BACKUP AS COMPRESSED BACKUPSET TAG 'WEEEKLY_PRD01_TBLS_BK_ONLY' TABLESPACE PRD01;
RMAN> BACKUP DATAFILE '/u01/app/oradata/TEST/users01.dbf';
RMAN> BACKUP DATAFILE 4;
RMAN> BACKUP INCREMENTAL LEVEL 1 DATABASE;
RMAN> BACKUP INCREMENTAL LEVEL 1 CUMULATIVE DATABASE;
RMAN> BACKUP INCREMENTAL LEVEL 0 DATABASE;
RMAN> BACKUP AS COPY DATABASE;
RMAN> BACKUP AS COPY DATAFILE 4 FORMAT '/u01/app/oracle/copy/users01.dbf';

RMAN> CONFIGURE MAXSETSIZE TO 1019M;
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK MAXPIECESIZE 50M;
RMAN> backup database filesperset 2;
RMAN> backup tablespace sysaux section size 1M;
RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK MAXOPENFILES 2 rate 50M;

RMAN> BACKUP AS COPY TAG 'BASE01' INCREMENTAL LEVEL 0 DATABASE;
RMAN> BACKUP TAG 'incr_update' INCREMENTAL LEVEL 1 DATABASE;
RMAN> RECOVER COPY OF DATABASE WITH TAG 'BASE01';

RMAN> BACKUP CURRENT CONTROLFILE;
RMAN> BACKUP SPFILE;

RMAN> LIST BACKUP SUMMARY;

No comments:

Post a Comment