Backup Archivelog
Backup archive logs files
run {
sql "ALTER SYSTEM ARCHIVE LOG CURRENT" ;
allocate channel rman_disk1 type disk;
set command id to 'DB_ARCH';
backup
maxsetsize = 1G
diskratio = 0
skip inaccessible
tag = 'Archive Logs'
(archivelog all format '/orabkup1/oracle/BACKUP/demo/ar_%d_%t_%c_%s_%p');
}
Backup archive log files and delete archive logs after backup. In this case, delete archive log files after 1G of archived logs files are backed up
run {
allocate channel ch1 type disk ;
set command id to 'DB_ARCH';
backup
maxsetsize = 1G
diskratio = 0
skip inaccessible
tag = 'Archive Logs'
(archivelog all delete input format ‘/orabkup1/oracle/BACKUP/demo/ar_%d_%t_%c_%s_%p’);
}
Backup archive logs files for the 1st time and don’t backup if it is been already backed up
run {
sql "ALTER SYSTEM ARCHIVE LOG CURRENT" ;
allocate channel rman_disk1 type disk;
set command id to 'DB_ARCH';
backup
maxsetsize = 1G
diskratio = 0
skip inaccessible
tag = 'Archive Logs'
(archivelog all not backed up 1 times format '/orabkup1/oracle/BACKUP/demo/ar_%d_%t_%c_%s_%p');
}
Backup database including archive log files
backup
(database)
plus archivelog
skip inaccessible;
Backup database including archive log files and delete archive logs after backup
backup
full
filesperset = 1024
diskratio = 0
tag = 'Full'
(database format /orabkup1/oracle/BACKUP/demo/df_%d_%t_full_%c_%s_%p'')
plus archivelog
skip inaccessible
delete input
format '/orabkup1/oracle/BACKUP/demo/ar_%d_%t_%c_%s_%p';
Hope this help. Regards Rupam