Wednesday, April 1, 2009

backup and recover 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.

The default location for generating backups on Red Hat Linux systems is CRS_home/cdata/cluster_name where cluster_name is the name of your cluster and CRS_home is the home directory of your Oracle Clusterware installation.

ocrconfig -showbackup

ocrconfig -export backup_file_name

Recovering the OCR
make sure the OCR is unavailable

ocrcheck

To restore the OCR from automatically generated backup
1,#ocrconfig -showbackup
2,$ocrdump -backupfile file_name
3,#crsctl stop crs
4,#ocrconfig -restore file_name
5,#crsctl start crs
6,cluvfy com ocr -n all [-verbose]

to recover OCR from OCR export file
1,#crsctl stop crs
2,#ocrconfig -import file_name
3,#crsctl start crs
4,#cluvfy com ocr -n all [-verbose]


No comments: