oracle 11gR2 asmcmd 工具增加md_backup和md_restore命令
oracle 11gR2 版本增加对磁盘组元数据备份与恢复的命令
md_backup :Creates a backup of the metadata of mounted disk groups.
md_restore :Restores disk groups from a backup of the metadata.
md_backup :
Syntax and Description
md_backup backup_file
[-G 'diskgroup [,diskgroup,...]']
Example 12–38 Using md_backup
ASMCMD [+] > md_backup /tmp/dgbackup20090716
ASMCMD [+] > md_backup /tmp/dgbackup20090716 -G data,fra
Disk group metadata to be backed up: DATA
Disk group metadata to be backed up: FRA
Current alias directory path: ASM/ASMPARAMETERFILE
Current alias directory path: ORCL/DATAFILE
Current alias directory path: ORCL/TEMPFILE
Current alias directory path: ORCL/CONTROLFILE
Current alias directory path: ORCL/PARAMETERFILE
Current alias directory path: ASM
Current alias directory path: ORCL/ONLINELOG
Current alias directory path: ORCL
Current alias directory path: ORCL/CONTROLFILE
Current alias directory path: ORCL/ARCHIVELOG/2009_07_13
Current alias directory path: ORCL/BACKUPSET/2009_07_14
Current alias directory path: ORCL/ARCHIVELOG/2009_07_14
Current alias directory path: ORCL
Current alias directory path: ORCL/DATAFILE
Current alias directory path: ORCL/ARCHIVELOG
Current alias directory path: ORCL/BACKUPSET
Current alias directory path: ORCL/ONLINELOG
md_restore :
Syntax and Description
md_restore backup_file [--silent]
[--full|--nodg|--newdg -o 'old_diskgroup:new_diskgroup [,...]']
[-S sql_script_file] [-G 'diskgroup [,diskgroup...]']
Example
The first example restores the disk group data from the backup script. and creates a
copy. The second example takes an existing disk group data and restores its metadata.
The third example restores disk group data completely but the new disk group that is
created is called data2. The fourth example restores from the backup file after
applying the overrides defined in the override.sql script. file.
Example 12–39 Using md_restore
ASMCMD [+] > md_restore –-full –G data –-silent /tmp/dgbackup20090714
ASMCMD [+] > md_restore –-nodg –G data –-silent /tmp/dgbackup20090714
ASMCMD [+] > md_restore –-newdg -o 'data:data2' --silent /tmp/dgbackup20090714
ASMCMD [+] > md_restore -S override.sql --silent /tmp/dgbackup20090714