Oracle RAC backup and recovery OCR
For how to add and delete Oracle rac ocr, see:
Voting disks Backup Recovery reference:
1. OCR supports two backup methods: automatic backup and manual backup.
Automatic Backup:
Oracle Clusterware automatically creates OCR backups every 4 hours. at any one time, Oracle Clusterware always retains the latest 3 backup copies of the OCR that are 4 hours old, 1 day old, and 1 week old.
---- An Oracle cluster is automatically backed up every 4 hours. At any time, the Oracle cluster will always save three backup files. They are backup files for the last 4 hours, the last 1 day, And the last 1 week.
You can view the automatic backup files in the following ways:
Ocrconfig-showbackup
Manual backup control file:
You can use the following method to export the OCR content to a file. backup_file_name is the name of the backup file.
Ocrconfig-export backup_file_name
Tip: You need to use the root user to execute this command
Example:
-- Backup
[Root @ node1 bin] #./ocrconfig-export/home/oracle/backup/ocrbackup1.bak
-- View the backup file
[Oracle @ node1 backup] $ ll
Total 104632
-Rw-r -- 1 root 86056 Mar 18 20:18 ocrbackup1.bak
2. OCR supports two methods: automatic backup and manual backup.
Restore from automatic backup:
Use the following method to restore OCR
Ocrconfig-restore file_name prompt: run as the root user. file_name indicates the backup file name from which the backup file you want to recover
1. Disable CRS on two nodes
[Root @ node1 bin] #./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[Root @ node2 bin] #./crsctl stop crs
Stopping resources.
Successfully stopped CRS resources
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
2. Restore OCR
① Simulate the destruction of the raw device data of OCR. This example uses non-redundancy.
[Root @ node1 bin] # dd if =/dev/urandom of =/dev/raw/raw1
Dd: writing to '/dev/raw/raw1': No space left on device
208865 + 0 records in
208864 + 0 records out
106938368 bytes (107 MB) copied, 123.665 seconds, 865 kB/s
-- Crs cannot be started after destruction.