bakl0----->backup incremental level 0 database format '/oracle/orabak/databak/%T_%u.dbf' plus archivelog format '/oracle/orabak/logbak/%T_%u.arc' delete input;
bakl1----->backup incremental level 1 database format '/oracle/orabak/databak/%T_%u.dbf' plus archivelog format '/oracle/orabak/logbak/%T_%u.arc' delete input;
bakl2----->backup incremental level 2 database format '/oracle/orabak/databak/%T_%u.dbf' plus archivelog format '/oracle/orabak/logbak/%T_%u.arc' delete input;
rman target/ msglog=/oracle/orabak/script/bakl0.log cmdfile=/oracle/orabak/script/bakl0
rman target/ msglog=/oracle/orabak/script/bakl1.log cmdfile=/oracle/orabak/script/bakl1
rman target/ msglog=/oracle/orabak/script/bakl2.log cmdfile=/oracle/orabak/script/bakl2
crontab -e -n oracle
45 23 * * 0 rman target/ msglog=/oracle/orabak/script/bakl0.log cmdfile=/oracle/orabak/script/bakl0
45 23 * * 1 rman target/ msglog=/oracle/orabak/script/bakl2.log cmdfile=/oracle/orabak/script/bakl2
45 23 * * 2 rman target/ msglog=/oracle/orabak/script/bakl2.log cmdfile=/oracle/orabak/script/bakl2
45 23 * * 3 rman target/ msglog=/oracle/orabak/script/bakl1.log cmdfile=/oracle/orabak/script/bakl1
45 23 * * 4 rman target/ msglog=/oracle/orabak/script/bakl2.log cmdfile=/oracle/orabak/script/bakl2
45 23 * * 5 rman target/ msglog=/oracle/orabak/script/bakl2.log cmdfile=/oracle/orabak/script/bakl2
45 23 * * 6 rman target/ msglog=/oracle/orabak/script/bakl2.log cmdfile=/oracle/orabak/script/bakl2
crontab -l - n oracle查看自动备份脚本。
阅读(1726) | 评论(0) | 转发(0) |