Backup and Recovery of OCR - Oracle Cluster Registry
======================================================
Oracle Cluster Registry (OCR) file is a key component of the Cluster. It maintains the information about cluster node list, instance to
node mapping and application resources profiles such as VIP address, services...Etc.
There are two methods for OCR Backup (Oracle Cluster Registry)
1. Automatically generated OCR files under $CRS_HOME/cdata/crs
2. OCR export/logical backup
The Oracle Clusterware automatically creates OCR backups
-Every four hours: last three copies
-At the End of the Day: last two copies
-At the end of the week: last two copies.
To backup OCR file, copy the generated file from $CRS_HOME/cdata/crs to your backup directory (/backup/oracle).
You must run the backup as “root”.
Run the below command to take OCR export backup.
# ocrconfig -export export_file_name
Restore and Recover OCR from backup (Oracle Cluster Registry)
==================================================================
Step 1: Locate physical the OCR backups using –showbackup command.
#ocrconfig – showbackup
Step 2: Review the contents
#ocrdump –backupfile backup_file_name
Step 3: Stop the Oracle clusterware on all the nodes.
#crsctl stop crs
Step 4: Restore the OCR backup
# ocrconfig –restore $CRS_HOME/cdata/crs/day.ocr
OR
Restore the OCR from export/logical backup.
# ocrconfig –import export_file_name
For ex: - # ocrconfig –import /backup/oracle/exp_ocrbackup.dmp
Step 5: Restart the Clusterware on all nodes.
#crsctl start crs
Step 6: Check the OCR integrity
# cluvfy comp ocr –n all
No comments:
Post a Comment