To see current location of OCR use the following command
ocrcheck
OCR BACKUP
The following command lists all OCR backup. Note: All OCR operations should be performed as root user.
ocrconfig -showbackup
Before dealing with OCR backup, let us see how to perform OCR mirroring.
OCR should be up and running to perform mirroring.
Say the cluster has only one OCR file /ocr/ocrdisk1. Now let us mirror to /ocr/ocrdisk2
touch /ocr/ocrdisk2
ocrconfig -replace ocrmirror /ocr/ocrdisk2
OCR Backup will be done using following methods
1. Oracle Cluster-ware automatically creates OCR backup for every 4 hours and retains last 3 backup. Also we can see daily, weekly, monthly backup. CRSD process creates this backup in location $ORA_CRS_HOME/cdata/crs
2. Use export command
ocrconfig -export /tmp/ocr-export.dmp
3. Backup using copy command.
--If OCR is in raw partition
dd if=/ocr/ocrdisk1 of=/mountpoint/filename
-- If ocr is in ocfs use tar or cp
cp -p /ocr/* /BackupDir
tar -cvf ocr.tar /ocr
OCR RESTORE
OCR restore can be done using following methods.
1. restore from OCR backup
--Touch the ocr files if files are not present. Else restore won’t be successful.
touch /ocr/ocrdisk1
touch /ocr/ocrdisk2
ocrconfig -restore $ORA_CRS_HOME/cdata/crs/day.ocr
2. import from ocr dump
ocrconfig -import /tmp/ocr-export.dmp
3. Copy command
dd if=/ocr/ocrdisk1 of=/mountpoint/filename
cp –p /BackupDir/*.ocr /ocr (only in ocfs)
No comments:
Post a Comment