--备份
ASMCMD [+] > md_backup /tmp/asm.bak
Disk group metadata to be backed up: DATA2
Disk group metadata to be backed up: DATA
Current alias directory path: DB11/TEMPFILE
Current alias directory path: DB11/CONTROLFILE
Current alias directory path: ASM/ASMPARAMETERFILE
Current alias directory path: DB11/PARAMETERFILE
Current alias directory path: ASM
Current alias directory path: DB11/DATAFILE
Current alias directory path: DB11
Current alias directory path: DB11/ONLINELOG
ASMCMD [+] > exit
--删除磁盘组DATA2
-bash-3.2$ sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Wed Jan 11 11:33:04 2012
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
SQL> drop diskgroup data2 including contents;
Diskgroup dropped.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Automatic Storage Management option
--使用之前备份的文件进行恢复
--中间出现问题,参数-G写成小写了
--不过恢复仍然成功
-bash-3.2$ asmcmd -p
ASMCMD [+] > md_restore --full -g DATA2 /tmp/asm.bak
WARNING:option 'g' is deprecated for 'md_restore'
please use 'G'
Current Diskgroup metadata being restored: DATA2
Diskgroup DATA2 created!
System template TEMPFILE modified!
System template CHANGETRACKING modified!
System template DUMPSET modified!
System template ASM_STALE modified!
System template ASMPARAMETERFILE modified!
System template ASMPARAMETERBAKFILE modified!
System template PARAMETERFILE modified!
System template CONTROLFILE modified!
System template ONLINELOG modified!
System template FLASHBACK modified!
System template OCRBACKUP modified!
System template AUTOBACKUP modified!
System template DATAFILE modified!
System template ARCHIVELOG modified!
System template FLASHFILE modified!
System template XTRANSPORT modified!
System template OCRFILE modified!
System template BACKUPSET modified!
System template DATAGUARDCONFIG modified!
--确认磁盘组
ASMCMD [+] > ASMCMD [+] > lsdg
State Type Rebal Sector Block AU Total_MB Free_MB Req_mir_free_MB Usable_file_MB Offline_disks Voting_files Name
MOUNTED EXTERN N 512 4096 1048576 5114 3517 0 3517 0 N DATA/
MOUNTED NORMAL N 512 4096 1048576 10228 10126 0 5063 0 N DATA2/
--如果配合rman的对数据库备份
--安全级别将会更高