11g asm metadata 備份恢復演練

安佰勝發表於2012-01-11

11g asm metadata 備份恢復演練
 
=====================

--備份
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的對資料庫備份
--安全級別將會更高
 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/13177610/viewspace-714731/,如需轉載,請註明出處,否則將追究法律責任。

相關文章