您好,登錄后才能下訂單哦!
1、將數據庫完全備份集和歸檔日志備份集傳到執行恢復的 Oracle 服務器
# 傳到中轉服務器
scp -P 2222 database.20181030.5* 218.17.56.50:/tmp/backup
scp -P 2222 archivelog.20181029.5ltgrqir_1_1.rman 218.17.56.50:/tmp/backup
scp -P 2222 archivelog.20181030.* 218.17.56.50:/tmp/backup
# 傳到 Oracle 服務器
scp -r backup/ oracle@188.188.1.120:~/
2、注冊備份集到控制文件
catalog backuppiece '/home/oracle/backup/archivelog.20181029.5ltgrqir_1_1.rman';
catalog backuppiece '/home/oracle/backup/archivelog.20181030.5stguer0_1_1.rman';
catalog backuppiece '/home/oracle/backup/archivelog.20181030.5ttguer0_1_1.rman';
catalog backuppiece '/home/oracle/backup/archivelog.20181030.5utguesp_1_1.rman';
catalog backuppiece '/home/oracle/backup/archivelog.20181030.5vtguesr_1_1.rman';
catalog backuppiece '/home/oracle/backup/archivelog.20181030.60tgueuk_1_1.rman';
catalog backuppiece '/home/oracle/backup/database.20181030.5otgue2k_1_1.rman';
catalog backuppiece '/home/oracle/backup/database.20181030.5ptgue2k_1_1.rman';
catalog backuppiece '/home/oracle/backup/database.20181030.5qtgueid_1_1.rman';
3、處理 incarnation (有需要則執行)
shutdown immediate;
startup mount;
list incarnation;
reset database to incarnation 1;
4、執行不完全恢復
# rman 腳本
cat restore.rman
run {
shutdown immediate;
startup mount;
set until time = "to_date('30-10-18 12:00:00','dd-mm-yy hh34:mi:ss')";
restore database;
recover database;
alter database open resetlogs;
}
# 恢復
rman target / @restore.rman
注意:如果恢復報錯,檢查備份集 Status 是否為 AVAILABLE。如果備份集有效,仍然無法創建數據文件,則從裝系統和數據庫可解決此問題。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。