Search This Blog

Saturday, September 22, 2012

Oracle RAC 11gR2 Voting Disks & OCR Backups.

Voting Disks

In 11g release 2 you no longer have to take voting disks backup. In fact according 
to Oracle documentation restoration of voting disks that were copied using the 
"dd" or "cp" command may prevent your clusterware from starting up.


So, In 11g Release 2 your voting disk data is automatically backed up in 
the OCR whenever there is a configuration change.

Also the data is automatically restored to any voting that is added.


OCR BACKUP

Automatic backups : -

a) Oracle Clusterware (CRSD) automatically creates OCR backups every 4 hours.
b) A backup is created for each full day.
c) A backup is created at the end of each week.
d) Oracle Database retains the last three copies of OCR.


Manual backups: -

a) can be taken using the "ocrconfig -manualbackup" command



Example:


check for all the backups.


[grid@rac1 ~]$ ocrconfig -showbackup
PROT-24: Auto backups for the Oracle Cluster Registry are not available
PROT-25: Manual backups for the Oracle Cluster Registry are not available


Since this system is a fresh one it does not contain any backups.


ok, lets take a manual backup.

[grid@rac1 ~]$ ocrconfig -manualbackup
PROT-20: Insufficient permission to proceed. Require privileged user

[grid@rac1 ~]$ which ocrconfig
/u01/app/11.2.0/grid/bin/ocrconfig

[root@rac1 bin]# cd /u01/app/11.2.0/grid/bin

[root@rac1 bin]# ./ocrconfig -manualbackup

rac2     2012/09/21 23:51:32     /u01/app/11.2.0/grid/cdata/rac-cluster/backup_20120921_235132.ocr

[root@rac1 bin]# ./ocrconfig -showbackup
PROT-24: Auto backups for the Oracle Cluster Registry are not available

rac2     2012/09/21 23:51:32     /u01/app/11.2.0/grid/cdata/rac-cluster/backup_20120921_235132.ocr


Check the integrity and contents of the backup file by using the ocrdump command.

Since my backup file is stored in rac2 i have to execute the following command from there.

[root@rac2 bin]# ./ocrdump -backupfile /u01/app/11.2.0/grid/cdata/rac-cluster/backup_20120921_235132.ocr


Open the dump file.


[root@rac2 bin]# vi OCRDUMPFILE 

Its a huge file so i am only showing the first few lines.


09/22/2012 00:00:37
/u01/app/11.2.0/grid/cdata/rac-cluster/backup_20120921_235132.ocr
./ocrdump.bin -backupfile /u01/app/11.2.0/grid/cdata/rac-cluster/backup_20120921_235132.ocr

[SYSTEM]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : 
PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, 
GROUP_NAME : root}

[SYSTEM.version]
UB4 (10) : 5
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : 
PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, 
GROUP_NAME : root}

[SYSTEM.version.activeversion]
ORATEXT : 11.2.0.1.0
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : 
PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, 
GROUP_NAME : root}

[SYSTEM.version.hostnames]
UNDEF :
SECURITY : {USER_PERMISSION : PROCR_ALL_ACCESS, GROUP_PERMISSION : 
PROCR_READ, OTHER_PERMISSION : PROCR_READ, USER_NAME : root, 
GROUP_NAME : root}
"OCRDUMPFILE" 2940L, 203336C



You can and should take OCR backups using "ocrconfig -export and ocrconfig -import" commands.

[root@rac1 bin]# ./ocrconfig -export  /tmp/ocr_rac1_Date_2012_22_09_Time_12_20_AM_back.dmp

Oracle recommends that you give a proper timestamp to your export dump.
















0 comments:

Post a Comment