How To Configure OCR Backups

      No Comments on How To Configure OCR Backups

BACKGROUND

The Oracle Cluster Registry (OCR) contains important cluster and database configuration information for RAC and Oracle Clusterware. One of the Oracle Clusterware instances in the cluster, the CRSD master, automatically creates OCR backups every four hours, and CRS retains the last three copies. The CRSD process also creates an OCR backup at the beginning of each day and of each week, and retains the last two copies.

CONFIGURING THE OCR BACKUP

The frequencies of the OCR backups cannot be modified, neither can the number of copies that are retained. It is possible to customise location of the backups.

The current names and location of the backups can be found by issuing the following command:

      ocrconfig -showbackup

By default, the location of each automatically generated backup file is the following directory:

      <CRS HOME>/cdata/<CLUSTER NAME>

Oracle recommends changing this location to one that is shared by all nodes in the cluster using the following command:

      ocrconfig -backuploc <full path name to new location directory>

MANUAL OCR BACKUPS

Because of the importance of the OCR information, Oracle recommends taking a manual backup of the automatically generated backups and storing the copy on a different device to the one where the primary OCR resides. This can be done using any backup software appropriate for the operating system.

In addition, Oracle also recommends taking an export of the OCR before and after any significant changes are made to the cluster configuration, such as adding or deleting nodes, changing resources or creating databases. As root, use the following command to perform the export:

      ocrconfig -export <full path name to export file>

As some changes affect both the database and the OCR simultaneously, it is important that only a backup that reflects the current cluster configuration is used should an OCR recovery be required.

DO NOT try to use an older OCR backup to attempt to undo a failed OCR change as it will not rollback any potential changes that have also occurred in the database, thereby causing a mis-match of configurations.

Leave a Reply

Your email address will not be published. Required fields are marked *