Loading...

Configuring Backups of Oracle ASM Diskgroup MetaData

You can back up the ASM diskgroup metadata using a FileSystem subclient. The diskgroup metadata is used to reconstruct an ASM diskgroup that gets corrupted, for example, due to an accidental write to a disk using OS commands.

The meta data backup operation does not back up the file contents in the ASM diskgroup. To back up the file contents, use an appropriate utility. For example, use RMAN for database files.

Before You Begin

To back up the ASM diskgroup metadata, you require the asmcmd utility provided with the Oracle Grid Infrastructure. Refer Oracle documentation for the syntax and full list of supported options for your version of Oracle Grid Infrastructure.

Procedure

  1. Create a script on the client where the diskgroup metadata is being backed up.

    Sample script:

    #!/bin/sh
    BACKUP_DATE=`date +%Y%m%d`
    BACKUP_DIR=/path/to/backup_dir
    ORACLE_HOME=/path/to/grid_home
    ORACLE_SID=+ASM
    PATH=$ORACLE_HOME/bin:$PATH
    export ORACLE_HOME ORACLE_SID PATH
    asmcmd md_backup ${BACKUP_DIR}/asm_metadata_${BACKUP_DATE}

  2. Add the script in the pre-scan phase of the File System subclient.
  3. Add the backup directory specified in the script as the subclient content on the File System subclient.
  4. Optional: To remove the metadata backup file and prevent the metadata from building up, add the following script in the post-scan phase of the File System subclient:

    #!/bin/sh
    BACKUP_DATE=`date +%Y%m%d`
    BACKUP_DIR=/path/to/backup_dir
    rm -f ${BACKUP_DIR}/asm_metadata_${BACKUP_DATE}

Last modified: 7/10/2020 7:35:27 PM