Hi guys, did u use Oracle RAC 10g?
How u guys backup your database? obviously u guys using RMAN right?
Then, how about your OCR (Oracle Cluster Registry) and voting disk (CSS – Oracle Cluster Synchronization Services)?
Since RMAN not include OCR and voting disks during backup, so we need to find other way to backup both of ‘em.
I am using ocrconfig utility and dd command to backup OCR and voting disks respectively. Below are example how I backup OCR and Voting Disk in Oracle Solaris 10.
Backup OCR Disk
1. Logon as oracle user, then identify the PATH to ocrconfig binary
bash-3.00$ which ocrconfig
/u01/app/oracle/product/10.2.0/db_rac/bin/ocrconfig
Ok, now we know theĀ absolute PATH to ocrconfig bin
2. After that, cd to any directory to keep the backup and logon as root.
$ cd /export/home/oracle/backup
$ su
Password:
#
# pwd
/export/home/oracle/backup
3. Invoke the ocrconfig using the absolute path to create the backup. Optionally, use date in backup naming for reference purpose.
# todayis=`date +%d%m%Y`
# echo $todayis
27092011
#
# /u01/app/oracle/product/10.2.0/db_rac/bin/ocrconfig -export ocr$todayis.bak
#
4. Check the backup, using ls command. Done for the OCR backup!!
# ls
ocr27092011.bak
Backup Voting Disk
Now, I will backup the voting disk using dd command (for unix)
1. Logon as oracle user and identify the path for voting disk (CSS files)
$ crsctl query css votedisk
0. 0 /dev/rdsk/c4t60003BA4E80DE00048F9D126000523FBd0s6
1. 0 /dev/rdsk/c4t60003BA4E80DE00048F9D39F0008CACDd0s6
2. 0 /dev/rdsk/c4t60003BA4E80DE00048F9D105000EA167d0s6
2. After that, cd to directory (can be same directory that we backup the OCR previously) to keep the backup and logon as root.
$ cd /export/home/oracle/backup
$ su
Password:
#
# pwd
/export/home/oracle/backup
3. Invoke dd command to backup any one of the voting disk. In example below, I am using disk number 0
# todayis=`date '+%d%m%Y-%H%M'`
# echo "Date:Time $todayis"
Date:Time 27092011-1450
#
# dd if=/dev/rdsk/c4t60003BA4E80DE00048F9D126000523FBd0s6 of=vote_$todayis.bak bs=8192 count=35000
35000+0 records in
35000+0 records out
#
4. Check the backup, using ls command. Done for both OCR and voting disk backup!! ![]()
# ls
ocr27092011.bak
vote_27092011-1450.bak
Notes: Just 1 voting disk to be backup should be enough, because all voting disks are identical.
Now only ocrconfig does not work, we need to give -s online option as well for taking the ocr file backup.
E.G.
./ocrconfig -export /root/backup/hello.bak -s online