Note: The best practices described in this article are applicable to all Oracle Grid Infrastructure environments and are not specific to FlashGrid deployments. All FlashGrid customers are advised to follow these best practices.
Backup ASM spfile
Backup ASM spfile initially and after any changes.
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.974466047Copy the Oracle ASM SPFILE to the backup location:
ASMCMD> spbackup +GRID/myrac/ASMPARAMETERFILE/registry.253.974466047 /backup/spfileasm.oraBackup ASM password file
Backing up ASM password file once should be enough. If you change the password for pwfile users or add another user to the list, then take a new backup.
Locate the password file using the ASMCMD pwget command.
ASMCMD> pwget --asm
+GRID/orapwASMBack up the password file to another location with the pwcopy command.
ASMCMD> pwcopy +GRID/orapwASM /backup/orapwASM
copying +GRID/orapwASM -> /backup/orapwASMBackup 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: GRIDIn case you need to backup metadata only for a specific disk group, use -G <disk group name> option.
Backup OLR
If the Oracle Local Registry (OLR) is missing or corrupted, the clusterware will not be able to start. So take a manual backup initially and after any change.
Run the following command (in a cluster, run on each node):
Create manual backup:
# ocrconfig -local -manualbackupCopy the generated file to the backup location:
# cp /u01/app/12.2.0/grid/cdata/rac1/backup_20180510_230359.olr /backup/Or change the default backup location to /backup before making an actual backup:
# ocrconfig -local -backuploc /backup # ocrconfig -local -manualbackup
Mirror and Backup OCR (cluster only)
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 +FRAThere 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 -manualbackupRegularly save taken backup to another location using the following way:
Identify the 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.ocrOR
Change default backup locations to another diskgroup, other than GRID:
# ocrconfig -backuploc +FRA