================================================================================ ======== #*** Weekly RMAN Script weekly_full.

rman CONNECT TARGET / #*** Weekly full controlfile backup BACKUP AS COPY DEVICE TYPE DISK TAG = 'WEEKLY_CONTROLFILE' FORMAT '/u01/oradata/backups/weekly_controlfile_%d_t%t_s%s_p%p' CURRENT CONTROLFILE; #*** Weekly full spfile backup BACKUP AS COPY DEVICE TYPE DISK TAG = 'WEEKLY_SPFILE' FORMAT '/u01/oradata/backups/weekly_spfile_%d_t%t_s%s_p%p' SPFILE; #*** Weekly full database plus archivelog backup BACKUP CHECK LOGICAL AS COMPRESSED BACKUPSET INCREMENTAL LEVEL = 0 DEVICE TYPE DISK TAG = 'WEEKLY_DATABASE' FORMAT '/u01/oradata/backups/weekly_database_%d_t%t_s%s_p%p' DATABASE; #*** Weekly full archivelog backup change archivelog all validate; sql 'ALTER SYSTEM ARCHIVE LOG CURRENT'; BACKUP CHECK LOGICAL AS COMPRESSED BACKUPSET INCREMENTAL LEVEL = 0 DEVICE TYPE DISK TAG = 'WEEKLY_ARCHIVELOG' FORMAT '/u01/oradata/backups/weekly_archivelog_%d_t%t_s%s_p%p' ARCHIVELOG FROM TIME 'SYSDATE-7'; #*** Remove old backups and archivelogs DELETE BACKUP COMPLETED BEFORE 'SYSDATE-10' DEVICE TYPE DISK; DELETE NOPROMPT ARCHIVELOG UNTIL TIME 'SYSDATE-3'; #*** Maintenance steps CROSSCHECK COPY; CROSSCHECK BACKUP; CROSSCHECK ARCHIVELOG ALL; DELETE NOPROMPT OBSOLETE; DELETE NOPROMPT EXPIRED COPY;

================================================================================ =============== NOPROMPT NOPROMPT NOPROMPT NOPROMPT OBSOLETE.rman CONNECT TARGET / #*** Daily full database backup BACKUP CHECK LOGICAL AS COMPRESSED BACKUPSET INCREMENTAL LEVEL = 1 DEVICE TYPE DISK TAG = 'DAILY_DIFFERENTIAL_DATABASE' FORMAT '/u01/oradata/backups/daily_DIFFERENTIAL_database_%d_t%t_s%s_p%p' DATABASE.DELETE NOPROMPT EXPIRED BACKUP. #*** Maintenance steps DELETE DELETE DELETE DELETE EXIT. ================================================================================ ============ #*** Daily RMAN Script daily_DIFFERENTIAL. DELETE NOPROMPT EXPIRED ARCHIVELOG ALL. EXPIRED COPY. BACKUP CHECK LOGICAL AS COMPRESSED BACKUPSET INCREMENTAL LEVEL = 1 DEVICE TYPE DISK TAG = 'DAILY_DIFFERENTIAL_ARCHIVELOG' FORMAT '/u01/oradata/backups/daily_DIFFERENTIAL_archivelog_%d_t%t_s%s_p%p' ARCHIVELOG FROM TIME 'SYSDATE-3'. #*** Daily full archivelog backup change archivelog all validate. . EXPIRED ARCHIVELOG ALL. EXPIRED BACKUP. sql 'ALTER SYSTEM ARCHIVE LOG CURRENT'.

Sign up to vote on this title
UsefulNot useful