ASM Metadata Backup md_backup and Restore md_restore

Most of the time, backup ASM disk group is not necessary since you can recreate it and restore its content.  However, if you want to keep the user templates, aliases, and directories within ASM, you need to backup the metadata for the ASM objects.  The new utility in 11g is AMBR (ASM metadata backup and restore).  


Backup example:  


asmcmd md_backup /apps/oracle/bkdgroup -G DATA
asmcmd md_backup /apps/oracle/bkdgroupall -G 'DATA,DG_FRA_PF501'

Disk group metadata to be backed up: DATA
Disk group metadata to be backed up: DG_FRA_PF501
Current alias directory path: rac-scan
Current alias directory path: rac-scan/ASMPARAMETERFILE
Current alias directory path: rac-scan/OCRFILE
Current alias directory path: ORATOOLS/ARCHIVELOG/2011_10_04
Current alias directory path: ORATOOLS/CONTROLFILE
Current alias directory path: ORATOOLS/ARCHIVELOG
Current alias directory path: ORATOOLS
Current alias directory path: ORATOOLS/ONLINELOG
Current alias directory path: ORATOOLS/ARCHIVELOG/2011_10_06

with backup mode md_backup, information about ASM disks and disk groups, configurations, attributes, etc.. are stored in a text file bkdgroup or bkdgroupall.  It will be used later to restore the ASM diskgroup metadata definition.  The information gathers during ASM backup contains the ASM diskgroup name, Redundancy Type, Allocation Unit Size, diskpath, alias directories, stripe, full path of alias entries, etc..

In the restore mode md_restore, it re-create the disk group based on the backup file with all user-defined templates with the exact configuration as the backuped disk group.  There are several options when restore the disk group

full - re-create the disk group with the exact configuration
nodg - Restores metadata in an existing disk group provided as an input parameter
newdg - Change the configuration like failure group, disk group name, etc..


Restore example:

asmcmd md_restore bkdgroup --nodg -g DATA
asmcmd md_restore bkdgroupall --newdg -o 'DATA:DATA_NEW'

No comments:

Post a Comment