首頁 > 資料庫 > mysql教程 > Oracle 增量备份

Oracle 增量备份

WBOY
發布: 2016-06-07 17:29:07
原創
1071 人瀏覽過

常用脚本: -----1. 0级备份 批处理文件: set Oracle_SID=orcl rman target sys/test@orcl cmdfile=

常用脚本:
-----1. 0级备份
批处理文件:
set Oracle_SID=orcl
rman target sys/test@orcl cmdfile= 'S:/backup/scripts/0/db_fullbakup_orcl.rman' LOG='S:/backup/log/rman_backup_%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%.log'

rman脚本:
run {
configure retention policy to recovery window of 14 days;
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to 'S:\backup\controlfile\bak_%F';
allocate channel c1 device type disk format 'S:\backup\data\bak_%u';
allocate channel c2 device type disk format 'S:\backup\data\bak_%u';
backup incremental level=0 database skip inaccessible
plus archivelog filesperset 20
delete all input;
release channel c1;
release channel c2;
}
allocate channel for maintenance device type disk;
crosscheck backupset;
delete noprompt obsolete;

-----2. 1级备份
批处理文件:
set ORACLE_SID=orcl
rman target sys/test@orcl cmdfile='S:/backup/scripts/1/db_fullbakup_orcl.rman' LOG='S:/backup/log/rman_backup_%DATE:~0,4%%DATE:~5,2%%DATE:~8,2%.log'
rman脚本:
run {
configure retention policy to recovery window of 14 days;
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to 'S:\backup\controlfile\bak_%F';
allocate channel c1 device type disk format 'S:\backup\data\bak_%u';
allocate channel c2 device type disk format 'S:\backup\data\bak_%u';
backup incremental level=1 cumulative database skip inaccessible
plus archivelog filesperset 20
delete all input;
release channel c1;
release channel c2;
}
allocate channel for maintenance device type disk;
crosscheck backupset;
delete noprompt obsolete;

linux

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板