run{
CONFIGURE RETENTION POLICY TO REDUNDANCY 1;
CONFIGURE BACKUP OPTIMIZATION ON;
CONFIGURE DEFAULT DEVICE TYPE TO DISK;
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F';
CONFIGURE DEVICE TYPE DISK PARALLELISM 2;
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1;
CONFIGURE MAXSETSIZE TO UNLIMITED;
CONFIGURE SNAPSHOT CONTROLFILE NAME TO 'e:oracleackupsnapcf_clustdb1.f';
}
run
{
allocate channel ch1 type disk format 'e:oracleackupclustdb_%t_%s_%p';
backup database include current controlfile
tag = 'full database backup'
channel ch1;
}
restore database validate;
report obsolete;
delete force noprompt obsolete;
delete force noprompt expired backup;
run
{
allocate channel ch2 type disk format 'e:oracleackuparchivelog_%t_%s_%p';
SQL 'ALTER SYSTEM ARCHIVE LOG CURRENT';
BACKUP ARCHIVELOG
FROM TIME 'SYSDATE - 1'
tag = 'archivelog backup'
channel ch2;
}
list backup summary;
echo on
rman target / cmdfile 'd:11.sql' >>bak1.log
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/92530/viewspace-128031/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/92530/viewspace-128031/