ocr oracle,Oracle RAC备份和恢复OCR-Oracle
Oracle RAC備份和恢復(fù)OCR
Oracle RAC 備份和恢復(fù)OCR
voting disks備份恢復(fù)參考:
/database/201303/195593.html
1.OCR有兩種備份方式,一種是自動(dòng)備份,一種是手動(dòng)備份。
自動(dòng)備份: ?www.2cto.com
Oracle Clusterware automatically creates OCR backups every 4 hours. At any one time, Oracle Clusterware always retains the latest 3 backup copies of the OCR that are 4 hours old, 1 day old, and 1 week old.
—-Oracle集群每4個(gè)小時(shí)自動(dòng)備份一次。在任一時(shí)刻,Oracle集群總會(huì)保存3份備份文件。他們分別是最近4小時(shí),最近1天和最近1周的備份文件。
可以用下面的方式查看自動(dòng)備份的文件
ocrconfig -showbackup
手動(dòng)備份控制文件:
可以用下面的方式export OCR的內(nèi)容到一個(gè)文件,backup_file_name是備份的文件的名字
ocrconfig -export backup_file_name
提示:你需要用root用戶執(zhí)行此命令
示例:
–備份
[root@node1 bin]# ./ocrconfig -export /home/oracle/backup/ocrbackup1.bak
–查看備份文件
[oracle@node1 backup]$ ll
total 104632
-rw-r–r– 1 root root ? ? 86056 Mar 18 20:18 ocrbackup1.bak
2.OCR有兩種恢復(fù)方式,一種是從自動(dòng)備份中恢復(fù),一種是手動(dòng)備份中恢復(fù)。
從自動(dòng)備份中恢復(fù):
用下面的方式恢復(fù)OCR
ocrconfig -restore file_name
提示:用root用戶執(zhí)行,file_name為你想要從哪個(gè)備份文件中恢復(fù)的備份文件名
1.兩個(gè)節(jié)點(diǎn)關(guān)閉CRS
[root@node1 bin]# ./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@node2 bin]# ./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
2.恢復(fù)OCR
①模擬破壞OCR所在裸設(shè)備數(shù)據(jù),本例采用的非冗余。
[root@node1 bin]# dd if=/dev/urandom of=/dev/raw/raw1
dd: writing to `/dev/raw/raw1′: No space left on device
208865+0 records in
208864+0 records out
106938368 bytes (107 MB) copied, 123.665 seconds, 865 kB/s
–破壞后crs無(wú)法啟動(dòng)。
②恢復(fù)OCR
[root@node1 bin]# ./ocrconfig -restore /home/oracle/oracle/product/10.2.0/crs_1/cdata/crs/backup00.ocr
③驗(yàn)證OCR完整性
[oracle@node1 crs]$ cluvfy comp ocr -n all
Verifying OCR integrity
Checking OCR integrity…
Checking the absence of a non-clustered configuration…
All nodes free of non-clustered, local-only configurations.
Uniqueness check for OCR device passed.
Checking the version of OCR…
OCR of correct Version “2” exists.
Checking data integrity of OCR…
Data integrity check for OCR passed.
OCR integrity check passed.
Verification of OCR integrity was successful.
—-恢復(fù)后能啟動(dòng)
從手動(dòng)備份中恢復(fù):
用下面的方法從手動(dòng)備份中恢復(fù),file_name為備份的文件名
ocrconfig -import file_name
示例:
[root@node1 bin]# ./ocrconfig -import /home/oracle/backup/ocrbackup1.bak
[oracle@node1 crs]$ cluvfy comp ocr -n all
Verifying OCR integrity
Checking OCR integrity…
Checking the absence of a non-clustered configuration…
All nodes free of non-clustered, local-only configurations.
Uniqueness check for OCR device passed.
Checking the version of OCR…
OCR of correct Version “2” exists.
Checking data integrity of OCR…
Data integrity check for OCR passed.
OCR integrity check passed.
Verification of OCR integrity was successful.
恢復(fù)后可以啟動(dòng)
總結(jié)
以上是生活随笔為你收集整理的ocr oracle,Oracle RAC备份和恢复OCR-Oracle的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 在java 里kv 是什么_consul
- 下一篇: XElement.Load 需要释放吗_