<<Back to Oracle ASM Main Page
How to Backup ASM Diskgroup Metadata
ASM diskgroup metadata backup is performed using md_backup command. If no diskgroup specified ASM md_backup backs up all the mounted diskgroup metadata.Syntax:
md_backup <backup_file> [--acfs_sec_encr] [-G <diskgroups,...>]
Backup All Mounted Diskgroup
ASMCMD> md_backup /home/oragrid/dg_bkp
Disk group metadata to be backed up: DG_TST2_DATA
Disk group metadata to be backed up: DG_TST2_FRA
Disk group metadata to be backed up: DG_TST_DATA
Disk group metadata to be backed up: DG_TST_FRA
Disk group metadata to be backed up: DG_FLEX_DATA
....................................................
Current alias directory path: TST2T/764BD41B76B837D5E0530601A8C05A1A
Current alias directory path: TST2T/TEMPFILE
Current alias directory path: TST1T/769E1B25EFDA4E86E0530601A8C0A64C/TEMPFILE
Backup Specific Diskgroup
ASMCMD> md_backup /home/oragrid/dg_bkp_DG_TST2_DATA -G DG_TST2_DATA
Disk group metadata to be backed up: DG_TST2_DATA
Current alias directory path: TST2T
Current alias directory path: TST2T/764BD41B76B837D5E0530601A8C05A1A
Current alias directory path: TST2T/TEMPFILE
Current alias directory path: TST1T
Current alias directory path: TST1T/DATAFILE
Current alias directory path: TST2T/764BD41B76B837D5E0530601A8C05A1A/TEMPFILE
Current alias directory path: TST2T/CONTROLFILE
Current alias directory path: TST2T/DATAFILE
Current alias directory path: TST2T/ONLINELOG
Current alias directory path: TST2T/764BD41B76B837D5E0530601A8C05A1A/DATAFILE
ASMCMD> md_backup /home/oragrid/dg_bkp_DG_FLEX_DATA -G DG_FLEX_DATA
Disk group metadata to be backed up: DG_FLEX_DATA
How to Restore ASM DiskGroup Metadata
Backup taken using md_backup can only be stored using md_restoreSyntax:
md_restore <backup_file> [--silent][--full|--nodg|--newdg -o <old_diskgroup:new_diskgroup,...>] [--acfs_sec_encr <user:group> [--acfs_audit <user:mgr_group:auditor_group>]] [-S <sql_script_file>] [-G <diskgroups,...>]
Restoring Diskgroup with Same Name as Before
ASMCMD> md_restore /home/oragrid/dg_bkp_DG_FLEX_DATA --full -G DG_FLEX_DATA
Current Diskgroup metadata being restored: DG_FLEX_DATA
Diskgroup DG_FLEX_DATA created!
Restoring Diskgroup with Different Name
Restoring the diskgroup DG_FLEX_DATA as DG_FLEX_FRA
ASMCMD>md_restore /home/oragrid/dg_bkp_DG_FLEX_DATA --newdg -o 'DG_FLEX_DATA:DG_FLEX_FRA'
Note:- md_backup does not take the backup of data and therefore md_restore does not restore the data. It just takes the diskgroup metadata backup so incase if you loose your diskgroup you can rebuild its structure from scratch. Once you have build the diskgroup you can restore the data in diskgroup using RMAN/Import etc. depending the backup solution you use to backup your database
Comments
Post a Comment