真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

oraclerman備份腳本

日常習(xí)慣使用netbackup進(jìn)行數(shù)據(jù)庫備份,但是經(jīng)常環(huán)境中無netbackup,因此的自己寫個(gè)腳本,腳本很簡單,主要是寫費(fèi)時(shí)間,因此貼出來以備后用:

創(chuàng)新互聯(lián)建站主營迭部網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,成都app軟件開發(fā)公司,迭部h5小程序開發(fā)搭建,迭部網(wǎng)站營銷推廣歡迎迭部等地區(qū)企業(yè)咨詢

全備:

cat arch_rman_backup.sh:


source /home/oracle/.bash_profile
rman target / log=/u01/app/script/arch_rman.log<run
{
allocate channel ch2 device type disk;
allocate channel ch3 device type disk;
sql 'alter system archive log current';
#backup database format '/backup/db_%d_%T_%U';
sql 'alter system archive log current';
backup archivelog all format '/backup/arch_%U_%d_%T_%t' delete all input;
backup current controlfile format '/backup/ctl_%U_%d_%T_%t';
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt obsolete;
#delete noprompt backup of database completed before 'sysdate -7';
#delete noprompt archivelog all;
#delete noprompt backup of archivelog all completed before 'sysdate -7';
release channel ch2;
release channel ch3;
}
EOF

歸檔日志備份:

$cat arch_rman_backup.sh


source /home/oracle/.bash_profile
rman target / log=/u01/app/script/arch_rman.log<run
{
allocate channel ch2 device type disk;
allocate channel ch3 device type disk;
sql 'alter system archive log current';
#backup database format '/backup/db_%d_%T_%U';
sql 'alter system archive log current';
backup archivelog all format '/backup/arch_%U_%d_%T_%t' delete all input;
backup current controlfile format '/backup/ctl_%U_%d_%T_%t';
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired backup;
delete noprompt obsolete;
#delete noprompt backup of database completed before 'sysdate -7';
#delete noprompt archivelog all;
#delete noprompt backup of archivelog all completed before 'sysdate -7';
release channel ch2;
release channel ch3;
}
EOF

添加執(zhí)行權(quán)限:

chmod +x /u01/app/script/arch_rman_backup.sh

chmod +x /u01/app/script/full_rman_backup.sh

設(shè)置備份保留策略:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

添加定時(shí)任務(wù):

0 */2 * * *?? /u01/app/script/arch_rman_backup.sh
30 1 * * 0?? /u01/app/script/full_rman_backup.sh


網(wǎng)頁標(biāo)題:oraclerman備份腳本
當(dāng)前地址:http://weahome.cn/article/jpphsi.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部