一个简单的RMAN自动备份脚本

rman备份脚本:

#!/bin/bash
source /home/oracle/.bash_profile

rman target / << EOF
run {
allocate channel ch1 type disk;
allocate channel ch2 type disk;
backup incremental level 0 database include current controlfile plus archivelog delete all input;
release channel ch1;
release channel ch2;
}
quit;
EOF

crontab设置自动任务:

$crontab -l

0 1 * * * /home/oracle/backup.sh >> /home/oracle/backup.log

 

posted @ 2015-10-21 09:10  ChavinKing  阅读(625)  评论(0)    收藏  举报