rman备份脚本:
#!/bin/bash
source /home/oracle/.bash_profilerman 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;EOFcrontab设置自动任务:
$crontab -l
0 1 * * * /home/oracle/backup.sh >> /home/oracle/backup.log