linux下的rman自动备份脚本,linux rman 自动备份脚本

素颜马尾好姑娘i 2023-01-19 15:55 418阅读 0赞

[oracle@oa script]$ vi rman_bk.sh

#!/bin/sh

source /home/oracle/.bash_profile

cd $ORACLE_HOME/bin

rman target / nocatalog msglog=/App/oracle/oadb_backup/log/rman_bk_`date ‘+%Y%m%d%H%M%S’`.log <

run{

REPORT OBSOLETE;

DELETE force NOPROMPT OBSOLETE;

allocate channel c1 type disk;

allocate channel c2 type disk;

allocate channel c3 type disk;

backup full database tag ‘dbfull’ format ‘/App/oracle/oadb_backup/data/dbfull_%u_%s_%p’ ;

backup current controlfile tag ‘ctl’ format ‘/App/oracle/oadb_backup/data/ctl_%s_%p_%t’;

sql ‘alter system archive log current’;

#crosscheck archivelog all;

backup filesperset 3 archivelog all tag ‘arch’ format ‘/App/oracle/oadb_backup/data/arch_%u_%s_%p’ delete input;

release channel c1;

release channel c2;

release channel c3;

}

exit;

EOF

发表评论

表情:
评论列表 (有 0 条评论,418人围观)

还没有评论,来说两句吧...

相关阅读

    相关 crontab+rman 日期备份脚本

    新接手了几个客户的数据库,数据库真是一团糟糕,什么分区,索引,表空间都十分的乱,最重要的是归档都没有开,竟然还是生产库,更别说什么备份脚本了,最近一直在做备份恢复的整理工作,该

    相关 crontab+rman 日期备份脚本

    新接手了几个客户的数据库,数据库真是一团糟糕,什么分区,索引,表空间都十分的乱,最重要的是归档都没有开,竟然还是生产库,更别说什么备份脚本了,最近一直在做备份恢复的整理工作,该