Oracle rac ocr backup and recovery

Source: Internet
Author: User

Oracle Clusterware places the configuration information of the entire cluster on shared storage. The information includes the list of cluster nodes, the ing between cluster database instances and nodes, and the CRS Application resource information. That is, it is stored on the ocr disk (or ocfs file. Therefore, the importance of this configuration file is self-evident. We recommend that you back up ocr immediately between or after any operation that changes the ocr configuration. This document describes OCR backup and recovery based on the Oracle 10g RAC environment.

OCR reference:

Oracle rac ocr and amnesia

Management and Maintenance of Oracle RAC OCR

I. Concept of OCR backup and recovery
Similar to Oracle Database Backup Recovery, OCR backup also has the concept of physical backup or logical backup. Therefore, there are two backup methods and two recovery methods.
Physical backup and recovery:
By default, Oracle backs up the last three copies every four hours, and retains the last three copies of the previous day and the previous week.
You cannot customize the backup frequency and number of copies of backup files.
The backup for OCR is performed by the Master Node CRSD process. Therefore, the default backup location is under the $ CRS_HOME/crs/cdata/<cluster_name> directory.
The backup file is automatically renamed to reflect the backup time sequence. The last backup is called backup00.ocr.
Because the backup is performed on the Master Node, the backup file only exists on the Master Node.
After the crash of the Master Node, the remaining Node takes over.
You can run the <directory_name> ocrconfig-backuploc command to modify the backup directory.
An OCR disk can contain only two Primary OCR disks and one Mirror OCR disk. The two are mirroring each other to avoid spof.
For physical Backup recovery, you cannot simply use the copy command at the operating system level (when using ocr files). This operation will cause the ocr to become unavailable.

Logical backup and recovery:
The backup generated using ocrconfig-export is called logical backup.
Logical backup is recommended for major changes in ocr configurations, such as adding or deleting nodes, modifying cluster resources, and creating databases.
If the ocr is damaged due to incorrect configuration, we can use the ocrconfig-import method to restore it.
The lost or damaged ocr disk (File) can also be restored in this logic mode ).

Backup suggestions:
Copy the files generated by oracle's automatic backup to the shared or other storage devices.
At least one ocr configuration is exported every day.

Ii. Back up OCR

1. Automatic OCR backup
# Use ocrconfig-showbackup to view the node and path of the ocr backup
Oracle @ bo2dbp: ~> Ocrconfig-showbackup

Bo2dbp 2013/02/25 06:23:15/u01/oracle/crs/cdata/crs

Bo2dbp 2013/02/25 02:23:13/u01/oracle/crs/cdata/crs

Bo2dbp 2013/02/24 22:23:13/u01/oracle/crs/cdata/crs

Bo2dbp 2013/02/24 02:23:09/u01/oracle/crs/cdata/crs

Bo2dbp 2013/02/22 18:23:04/u01/oracle/crs/cdata/crs
Oracle @ bo2dbp: ~> Ls-hltr/u01/oracle/crs/cdata/crs
Total 40 M
-Rw-r -- 1 root 6.7 M 2013-02-22 18:23 week. ocr
-Rw-r -- 1 root 6.7 M 2013-02-24 day. ocr
-Rw-r -- 1 root 6.7 M 2013-02-24 22: 23 backup02.ocr
-Rw-r -- 1 root 6.7 M 2013-02-25 backup01.ocr
-Rw-r -- 1 root 6.7 M 2013-02-25 day _. ocr
-Rw-r -- 1 root 6.7 M 2013-02-25 06:23 backup00.ocr

# Changing the physical backup path
Ocrconfig-backuploc <new_dirname>

# Use physical backup to restore ocr
Ocrconfig-restore <backup_file_name>
For physical backup, only the restore method can be used for restoration, but the import method is not supported.

2. Manual OCR backup
Manual OCR backup is also a logical backup, which is implemented using the-export method.
Ocrconfig-export <backup_file_name>

# Backup example
# We recommend that you export ocr to different nodes and store the exported locations on the shared disk as much as possible so that any node can be recovered from the disk.
Oracle @ bo2dbp: ~> Sudo-s/u01/oracle/crs/bin/ocrconfig-export/u02/crs_bak/ocr_bak/exp/bo2dbp/ocr_bak.dmp
Root's password:
Oracle @ bo2dbp:/u02/crs_bak/ocr_bak/exp/bo2dbp> ls-hltr/u02/crs_bak/ocr_bak/exp/bo2dbp/ocr_bak.dmp
-Rw-r -- 1 root 144 K 2013-02-25/u02/crs_bak/ocr_bak/exp/bo2dbp/ocr_bak.dmp
Oracle @ bo2dbs: ~> Sudo-s/u01/oracle/crs/bin/ocrconfig-export/u02/crs_bak/ocr_bak/exp/bo2dbs/ocr_bak.dmp
Root's password:

  • 1
  • 2
  • 3
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.