日期:2011-01-25 22:55:00 来源:本站整理
Oracle10g OCR及Voting Disk的备份-备份恢复[Oracle防范]
本文“Oracle10g OCR及Voting Disk的备份-备份恢复[Oracle防范]”是由七道奇为您精心收集,来源于网络转载,文章版权归文章作者所有,本站不对其观点以及内容做任何评价,请读者自行判断,以下是其具体内容:
在Oracle10g RAC环境中,OCR及Voting Disk关于集群来说都是非常重要的.
那么若何对二者举行备份并且可以在弊端时举行恢复就显得极其重要.
OCR的数据Oracle会自动履行备份,通过ocrconfig -showbackup号令可以查看这些备份:
bash-2.05$ ocrconfig -showbackup db490-9 2008/03/01 19:26:29 /opt/oracle/product/10.2.0/crs10g/cdata/crs db490-9 2008/03/01 15:26:29 /opt/oracle/product/10.2.0/crs10g/cdata/crs db490-9 2008/03/01 11:26:29 /opt/oracle/product/10.2.0/crs10g/cdata/crs db490-9 2008/02/29 03:26:26 /opt/oracle/product/10.2.0/crs10g/cdata/crs db490-9 2008/02/22 03:26:13 /opt/oracle/product/10.2.0/crs10g/cdata/crs bash-2.05$ hostname db480-5 |
注意这个备份只会存储在一个节点上,并非全部节点城市记录这个备份.
在备份节点的呼应目录下我们可以找到这些备份:
$ cd /opt/oracle/product/10.2.0/crs10g/cdata/crs $ ls -al total 66420 drwxrwxr-x 2 oracle dba 512 Mar 1 19:26 . drwxrwxr-x 4 oracle dba 512 Nov 23 16:39 .. -rw-r--r-- 1 root root 4845568 Mar 1 19:26 backup00.ocr -rw-r--r-- 1 root root 4845568 Mar 1 15:26 backup01.ocr -rw-r--r-- 1 root root 4845568 Mar 1 11:26 backup02.ocr -rw-r--r-- 1 root root 4845568 Feb 29 03:26 day.ocr -rw-r--r-- 1 root root 4845568 Mar 1 03:26 day_.ocr -rw-r--r-- 1 root root 4845568 Feb 22 03:26 week.ocr -rw-r--r-- 1 root root 4845568 Feb 29 03:26 week_.ocr |
当呈现弊端时,可以通过ocrconfig号令来履行恢复,通过帮忙可以看到具体的用法:
$ ocrconfig -help Name: ocrconfig - Configuration tool for Oracle Cluster Registry. Synopsis: ocrconfig [option] option: -export <filename> [-s online] - Export cluster register contents to a file -import <filename> - Import cluster registry contents from a file -upgrade [<user> [<group>]] - Upgrade cluster registry from previous version -downgrade [-version <version string>] - Downgrade cluster registry to the specified version -backuploc <dirname> - Configure periodic backup location -showbackup - Show backup information -restore <filename> - Restore from physical backup -replace ocr|ocrmirror [<filename>] - Add/replace/remove a OCR device/file -overwrite - Overwrite OCR configuration on disk -repair ocr|ocrmirror <filename> - Repair local OCR configuration -help - Print out this help information Note: A log file will be created in $ORACLE_HOME/log/<hostname>/client/ocrconfig_<pid>.log. Please ensure you have file creation privileges in the above directory before running this tool. |
假如不出不测,恢复历程将会很简单,通过 ocrconfig -restore 便可以答复这里的物理备份.
关于voting disk可以通过dd来举行备份.
首先通过 crsctl query css votedisk 号令可以找到voting disk的存储地:
bash-2.05$ crsctl query css votedisk 0. 0 /dev/rdsk/voting located 1 votedisk(s). |
然后通过dd备份:
bash-2.05$ dd if=/dev/rdsk/voting of=voting.bak 211456+0 records in 211456+0 records out bash-2.05$ ls -al total 211588 drwxr-xr-x 2 oracle dba 512 Mar 1 21:13 . drwxr-xr-x 11 oracle dba 512 Jan 25 17:59 .. -rw-r--r-- 1 oracle dba 108265472 Mar 1 21:14 voting.bak |
当需求恢复时,通过dd举行恢复便可.这个voting disk记录了什么内容呢?
通过strings可以将此中的字符串取出来看一个印象:
bash-2.05$ strings voting.bak |sort -u CLSf Vote cLssTock clSs0pEr clsSkilL db480-5 db490-9 z{|} |
以上是“Oracle10g OCR及Voting Disk的备份-备份恢复[Oracle防范]”的内容,如果你对以上该文章内容感兴趣,你可以看看七道奇为您推荐以下文章:
本文地址: | 与您的QQ/BBS好友分享! |
评论内容只代表网友观点,与本站立场无关!
评论摘要(共 0 条,得分 0 分,平均 0 分)
查看完整评论