[00:15:22 root(grid)@rac1 ~]# ocrconfig
Name:
ocrconfig - Configuration tool for Oracle Cluster/Local Registry.
Synopsis:
ocrconfig [option]
option:
[-local] -export <filename>
- Export OCR/OLR contents to a file
[-local] -import <filename> - Import OCR/OLR contents from a file
[-local] -upgrade [<user> [<group>]]
- Upgrade OCR from previous version
-downgrade [-version <version string>]
- Downgrade OCR to the specified version
[-local] -backuploc <dirname> - Configure OCR/OLR backup location
[-local] -showbackup [auto|manual] - Show OCR/OLR backup information
[-local] -manualbackup - Perform OCR/OLR backup
[-local] -restore <filename> - Restore OCR/OLR from physical backup
-replace <current filename> -replacement <new filename>
- Replace an OCR device or file <current filename> with <new filename>
-add <filename> - Add a new OCR device/file
-delete <filename> - Remove a OCR device/file
-overwrite - Overwrite OCR configuration on disk
-repair -add <filename> | -delete <filename> | -replace <current filename> -replacement <new filename>
- Repair OCR configuration on the local node
-help - Print out this help information
Note:
* A log file will be created in
$ORACLE_HOME/log/<hostname>/client/ocrconfig_<pid>.log. Please ensure
you have file creation privileges in the above directory before
running this tool.
* Only -local -showbackup [manual] is supported.
* Use option '-local' to indicate that the operation is to be performed on the Oracle Local Registry.
-backuploc 用来设置orc物理自动备份或者手动备份的目录的
-manualbackup 用来进行物理的手动备份
-restore OCR的物理导入
-export OCR的逻辑导出
-import OCR的逻辑导入
ocrdump验证ocr信息,如:
以root执行:
ocrdump -backupfile /tmp/backup_20141027_041217.ocr
这个命令会在当前路径下产生一个文件:OCRDUMPFILE,查看这个文件即可
[04:11:58 root(grid)@rac1 ~]# ocrconfig -manualbackup
rac1 2014/10/27 04:12:17 /tmp/backup_20141027_041217.ocr
[04:12:17 root(grid)@rac1 ~]# ocrconfig -showbackup
PROT-24: Auto backups for the Oracle Cluster Registry are not available
rac1 2014/10/27 04:12:17 /tmp/backup_20141027_041217.ocr
[04:38:53 root(grid)@rac1 ~]# ocrconfig -export /tmp/ocr.bak