Note: The best practices described in this article are applicable to all Oracle Grid Infrastructure clusters and are not specific to FlashGrid cluster or Storage Fabric environments. All FlashGrid customers are advised to follow these best practices.
Backup ASM spfile
Backup ASM spfile initially and at any change.
There are several ways to backup ASM spfile using spcopy
, spbackup
or create pfile=<location> from spfile
.
To locate the Oracle ASM SPFILE, use the ASMCMD spget
command:
ASMCMD> spget +GRID/myrac/ASMPARAMETERFILE/registry.253.974466047
Copy the Oracle ASM SPFILE to the backup location:
ASMCMD> spbackup +GRID/myrac/ASMPARAMETERFILE/registry.253.974466047 /backup/spfileasm.ora
Backup ASM password file
Backing up ASM password file once should be enough. If you change password for pwfile users or add another user into the list, then make a new backup.
Locate the password file using the ASMCMD pwget
command.
ASMCMD> pwget --asm +GRID/orapwASM
Back up the password file to another location with the pwcopy
command.
ASMCMD> pwcopy +GRID/orapwASM /backup/orapwASM copying +GRID/orapwASM -> /backup/orapwASM
Backup diskgroup metadata
Use md_backup
command to create a backup file containing metadata for one or more disk groups.
To backup metadata for all disk groups, do the following:
ASMCMD> md_backup /tmp/dgmetabackup Disk group metadata to be backed up: DATA Disk group metadata to be backed up: FRA Disk group metadata to be backed up: GRID
In case you need to backup metadata only for a specific disk group, use -G
option.
Backup OLR
If OLR is missing or corrupted, clusterware can’t be started on that node. So make manual backup initially and after any change.
Do the following on each node:
Create manual backup:
# ocrconfig -local -manualbackup
Copy generated file to the backup location:
# cp /u01/app/12.2.0/grid/cdata/rac1/backup_20180510_230359.olr /backup/
Or change default backup location to /backup before making actual backup:
# ocrconfig -local -backuploc /backup # ocrconfig -local -manualbackup
Mirror and Backup OCR
You should configure OCR in two independent disk groups. Typically, this is the work area and the recovery area. At least two OCR locations should be configured.
# ocrconfig -add +FRA
There are automatic OCR backups that are taken in the past 4 hours, 8 hours, 12 hours, and in the last day and week.
You can also manually backup OCR before applying any patch or upgrade GI home:
# ocrconfig -manualbackup
Regularly save taken backup to another location using the following way:
Identify latest backup (manual or automatic):
[grid@rac1 ~]$ ocrconfig -showbackup rac1 2018/05/10 13:06:18 +GRID:/myrac/OCRBACKUP/backup00.ocr.289.975762375 830990544 …
Copy it to the backup location:
$ ocrconfig -copy +GRID:/myrac/OCRBACKUP/backup00.ocr.289.975762375 /backup/backup00.ocr
OR
Change default backup locations to another diskgroup, other than GRID:
# ocrconfig -backuploc +FRA