How To Backup And Restore ASM Metadata
BACKGROUND & OVERVIEW
The following documentation provides instructions for backing up and restoring the ASM metadata.
- Set the environment to ASM using .oraenv
- Issue asmcmd to start the ASM client
- The md_backup command makes a copy of the metadata for one or more disk groups. The summary usage is shown below.
md_backup [-b location_of_backup] [-g dgname [-g dgname …]]
- An example of the command is shown below. The resulting file contains all the metadata needed to recreate the ASM setup.
ASMCMD [+] > md_backup -b /tmp/backup.txt -g data Disk group to be backed up: DATA ASMCMD [+] >
- The md_restore command allows a restore of a disk group from the metadata created by the md_backup command. It also allows a certain amount of manipulation of the final disk groups during the restore. The summary usage is shown below.
md_restore -b <backup_file> [-li] [-t (full)|nodg|newdg] [-f <sql_script_file>] [-g '<diskgroup_name>,<diskgroup_name>,...'] [-o '<old_diskgroup_name>:<new_diskgroup_name>,...']
- A straight restore of the backup taken previously is shown below.
ASMCMD [+] > md_restore -b /tmp/backup.txt -t full -g data