...
Code Block |
---|
# # rmanARCH.rcv # connect target / run { configure retention policy to redundancy 1; configure controlfile autobackup off; # # Backup the control file and spfile to create a valid restore point # sql 'alter system archive log current'; allocate channel d1 type disk maxpiecesize 2G; backup as compressed backupset incremental level 0 format 'E:\Backup\%d\%T-CTRL-%s-%p.dmp' current controlfile spfile skip inaccessible skip readonly; release channel d1; # # Backup all the existing archive log files # allocate channel d1 type disk maxpiecesize 2G; sql 'alter system archive log current'; backup as compressed backupset format 'E:\Backup\%d\%T-ARCH-%s-%p.dmp' skip inaccessible archivelog all delete all input; release channel d1; } # # Report and delete any obsolete backupsets # report obsolete; delete force noprompt obsolete; # # Crosscheck the backup files for existence # allocate channel for maintenance type disk; crosscheck backup; release channel; # # Delete entries for non-existing backupset to remove the clutter # allocate channel for delete type disk; delete force noprompt expired backup; release channel; |