ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 11g asm metadata 备份恢复演练

11g asm metadata 备份恢复演练

原创 Linux操作系统 作者:安佰胜 时间:2012-01-11 11:38:28 0 删除 编辑

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/,如需转载,请注明出处,否则将追究法律责任。

下一篇: linux上安装mongodb
请登录后发表评论 登录
全部评论

注册时间:2009-08-26

  • 博文量
    215
  • 访问量
    607392