Rman Weekly

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

run {

allocate channel ch1 device type disk format


'/u01/app/oracle/fast_recovery_area/datastore/backupset/rman/weekly/database_full_
%U.bck';
allocate channel ch2 device type disk format
'/u01/app/oracle/fast_recovery_area/datastore/backupset/rman/weekly/database_full_
%U.bck';
allocate channel ch3 device type disk format
'/u01/app/oracle/fast_recovery_area/datastore/backupset/rman/weekly/database_full_
%U.bck';
allocate channel ch4 device type disk format
'/u01/app/oracle/fast_recovery_area/datastore/backupset/rman/weekly/database_full_
%U.bck';
allocate channel ch5 device type disk format
'/u01/app/oracle/fast_recovery_area/datastore/backupset/rman/weekly/database_full_
%U.bck';
allocate channel ch6 device type disk format
'/u01/app/oracle/fast_recovery_area/datastore/backupset/rman/weekly/database_full_
%U.bck';
backup as compressed backupset database;
release channel ch1; release channel ch2; release channel ch3; release channel ch4;
release channel ch5; release channel ch6;
sql 'alter system switch logfile';
sql 'alter system switch logfile';
sql 'alter system switch logfile';
sql 'alter system switch logfile';
sql 'alter system switch logfile';
}
#*** Maintenance steps
run{
#allocate channel for maintenance device type sbt parms
'SBT_LIBRARY=oracle.disksbt, ENV=(BACKUP_DIR=/tmp)';
CROSSCHECK COPY;
CROSSCHECK BACKUP;
CROSSCHECK ARCHIVELOG ALL;
#DELETE NOPROMPT OBSOLETE;
#DELETE NOPROMPT EXPIRED COPY;
#DELETE NOPROMPT EXPIRED BACKUP;
#DELETE NOPROMPT EXPIRED ARCHIVELOG ALL;
allocate channel ch1 device type disk format
'/u01/app/oracle/fast_recovery_area/datastore/backupset/rman/weekly/archives_
%U.bck';
allocate channel ch2 device type disk format
'/u01/app/oracle/fast_recovery_area/datastore/backupset/rman/weekly/archives_
%U.bck';
allocate channel ch3 device type disk format
'/u01/app/oracle/fast_recovery_area/datastore/backupset/rman/weekly/archives_
%U.bck';
backup as compressed backupset archivelog all;
release channel ch1; release channel ch2; release channel ch3;
#delete noprompt obsolete;
delete noprompt obsolete device type disk;
delete noprompt EXPIRED COPY device type disk;
delete noprompt EXPIRED BACKUP device type disk;
delete noprompt EXPIRED ARCHIVELOG ALL device type disk;
}

You might also like