Home > Database > Mysql Tutorial > Oracle RAC 备份和恢复OCR(10g)

Oracle RAC 备份和恢复OCR(10g)

WBOY
Release: 2016-06-07 17:27:26
Original
1029 people have browsed it

Oracle集群每4个小时自动备份一次。在任一时刻,Oracle集群总会保存3份备份文件。他们分别是最近4小时,最近1天和最近1周的备份文

Oracle RAC 备份和恢复OCR
 
Oracle RAC 添加和删除OCR参考:

voting disks备份恢复参考:

1.OCR有两种备份方式,一种是自动备份,一种是手动备份。
 
自动备份:
 
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个小时自动备份一次。在任一时刻,Oracle集群总会保存3份备份文件。他们分别是最近4小时,最近1天和最近1周的备份文件。
 
可以用下面的方式查看自动备份的文件
 
ocrconfig -showbackup


手动备份控制文件:
 
可以用下面的方式export OCR的内容到一个文件,backup_file_name是备份的文件的名字
 
ocrconfig -export backup_file_name

提示:你需要用root用户执行此命令
 

示例:
 
--备份
[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有两种恢复方式,一种是从自动备份中恢复,一种是手动备份中恢复。
 
从自动备份中恢复:
 
用下面的方式恢复OCR
 

 ocrconfig -restore file_name 提示:用root用户执行,file_name为你想要从哪个备份文件中恢复的备份文件名
 

1.两个节点关闭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.恢复OCR

①模拟破坏OCR所在裸设备数据,,本例采用的非冗余。
 

[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无法启动。

linux

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template