Administring OCR
Administring OCR
We will see how OCR(Oracle cluster Registry) backup & recovery is done .
Backup
Oracle clusterware automatically creastes a OCR backup every 4 hrs & retains the last 3 backups . Actually the CRSD process creates & manages the backup for each full day & a weekly backup at nd of the week .
Default backup Location : $CRS_HOME/cdata/$clustername
Other than the automated backup , you can export the content any time you want to a file .
eg : $ ocrconfig -export emergency_export.ocr
You can see the list of ocrbackup by using :
$ ocrconfig -showbackup
As the backup directory is default , you can change the dir by using below command
$ ocrconfig -backuploc <directory>
Restore
OCR can be restored (if you have a backup ) be below command
NOTE: Should you need to restore, make sure all CRS daemons on all nodes are stopped.
To perform a restore, execute the command:
$ cd CRS_Home/cdata/crscluster
$ ocrconfig -restore week.ocr
If you had exported using the above command & want to resore , then you can use import
IMPORTANT: Importing a backup when CRS daemons are running will only corrupt OCR.
$ ocrconfig -import emergency_export.ocr
If anything is wrong than you can use the OCRDUMP comand to dump all info to a file & check
$ ocrdump OCR_DUMP
Also you can use :
$ ocrcheck
to check for the stats of OCR