11g RAC OCR备份与恢复

Backing Up Oracle Cluster Registry

This section describes how to back up OCR content and use it for recovery. The first method uses automatically generated OCR copies and the second method enables you to issue a backup command manually:

  • Automatic backupsOracle Clusterware automatically creates OCR backups every four hours. At any one time, Oracle Database always retains the last three backup copies of OCR. The CRSD process that creates the backups also creates and retains an OCR backup for each full day and at the end of each week. You cannot customize the backup frequencies or the number of files that Oracle Database retains.

  • Manual backups: Run the ocrconfig -manualbackup command on a node where the Oracle Clusterware stack is up and running to force Oracle Clusterware to perform. a backup of OCR at any time, rather than wait for the automatic backup. You must run the command as a user with administrative privileges. The -manualbackup option is especially useful when you want to obtain a binary backup on demand, such as before you make changes to the OCR. The OLR only supports manual backups.

When the clusterware stack is down on all nodes in the cluster, the backups that are listed by the command ocrconfig -showbackup may differ from node to node. After you install or upgrade Oracle Clusterware on a node, or add a node to the cluster, when the root.sh script. finishes, it backs up the OLR.

Restoring Oracle Cluster Registry

If a resource fails, then before attempting to restore OCR, restart the resource. As a definitive verification that OCR failed, run ocrcheck and if the command returns a failure message, then both the primary OCR and the OCR mirror have failed. Attempt to correct the problem using the OCR restoration procedure for your platform.

Notes:

See Also:

Oracle Automatic Storage Management Administrator's Guide for more information about managing Oracle ASM disk groups

Restoring the Oracle Cluster Registry on Linux or UNIX Systems

If you are storing the OCR on an Oracle ASM disk group, and that disk group is corrupt, then you must restore the Oracle ASM disk group using Oracle ASM utilities, and then mount the disk group again before recovering the OCR. Recover the OCR by running the command ocrconfig -restore.

See Also:

Oracle Automatic Storage Management Administrator's Guide for information about how to restore Oracle ASM disk groups

Use the following procedure to restore OCR on Linux or UNIX systems:

  1. List the nodes in your cluster by running the following command on one node:

    $ olsnodes
    
  2. Stop Oracle Clusterware by running the following command as root on all of the nodes:

    # crsctl stop crs
    

    If the preceding command returns any error due to OCR corruption, stop Oracle Clusterware by running the following command as root on all of the nodes:

    # crsctl stop crs -f
    
  3. If you are restoring OCR to a cluster file system or network file system, then run the following command as root to restore OCR with an OCR backup that you can identify in "Listing Backup Files":

    # ocrconfig -restore file_name
    

    After you complete this step, skip to step 8.

  4. Start the Oracle Clusterware stack on one node in exclusive mode by running the following command as root:

    # crsctl start crs -excl
    

    Ignore any errors that display.

    Check whether crsd is running. If it is, stop it by running the following command as root:

    # crsctl stop resource ora.crsd -init
    

    Caution:

    Do not use the -init flag with any other command.
  5. Restore OCR with an OCR backup that you can identify in "Listing Backup Files" by running the following command as root:

    # ocrconfig -restore file_name
    

    Notes:

    • If the original OCR location does not exist, then you must create an empty (0 byte) OCR location before you run the ocrconfig -restore command.

    • Ensure that the OCR devices that you specify in the OCR configuration exist and that these OCR devices are valid.

    • If you configured OCR in an Oracle ASM disk group, then ensure that the Oracle ASM disk group exists and is mounted.

    See Also:

  6. Verify the integrity of OCR:

    # ocrcheck
    
  7. Stop Oracle Clusterware on the node where it is running in exclusive mode:

    # crsctl stop crs -f
    
  8. Begin to start Oracle Clusterware by running the following command as root on all of the nodes:

    # crsctl start crs
    
  9. Verify the OCR integrity of all of the cluster nodes that are configured as part of your cluster by running the following CVU command:

    $ cluvfy comp ocr -n all -verbose


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/15747463/viewspace-763266/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/15747463/viewspace-763266/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值