91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

oracle rman備份腳本

發布時間:2020-05-19 19:34:39 來源:網絡 閱讀:1308 作者:春秋小記 欄目:關系型數據庫

日常習慣使用netbackup進行數據庫備份,但是經常環境中無netbackup,因此的自己寫個腳本,腳本很簡單,主要是寫費時間,因此貼出來以備后用:

全備:

cat arch_rman_backup.sh:


source /home/oracle/.bash_profile
rman target / log=/u01/app/script/arch_rman.log<<EOF
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<<EOF
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


添加執行權限:

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

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

設置備份保留策略:

CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 7 DAYS;

添加定時任務:

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

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

连山| 克山县| 武强县| 东平县| 凌海市| 股票| 金乡县| 江陵县| 延边| 芮城县| 浠水县| 楚雄市| 武乡县| 方城县| 石棉县| 桃园县| 滁州市| 金山区| 宁晋县| 博罗县| 麻江县| 林西县| 阳朔县| 防城港市| 新绛县| 乐亭县| 区。| 伊宁市| 北流市| 察隅县| 那坡县| 兰考县| 余姚市| 彰化县| 泽库县| 湖南省| 信丰县| 岚皋县| 富锦市| 清远市| 汪清县|