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

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7199859/viewspace-661716/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/7199859/viewspace-661716/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值