md_backup,md_restore,kfed

--md_backup: 备份ASM的目录
[email protected]> select name from v$asm_diskgroup;

NAME
------------------------------
DG_A
DG_B

sgcrm5*sgcrm5-/orabak/asmbak >export ORACLE_SID=+ASM
 sgcrm5*+ASM-/orabak/asmbak >asmcmd md_backup -b /home/oracle/tcyang/asmbak/asmbk_dg_a -g 'DG_A'
Disk group to be backed up: DG_A
 sgcrm5*+ASM-/orabak/asmbak >asmcmd md_backup -b /home/oracle/tcyang/asmbak/asmbk_dg_b -g 'DG_B'
Disk group to be backed up: DG_B

--md_restore: 恢复ASM的目录
sgcrm5*sgcrm5-/orabak/asmbak >export ORACLE_SID=+ASM
asmcmd md_restore -b /home/oracle/tcyang/asmbk/asmbk_dg_a -g 'dg_a'
asmcmd md_restore -b /home/oracle/tcyang/asmbk/asmbk_dg_a -g 'dg_b'





--kfed :备份磁盘元数据 (将ASM磁盘信息保存到文件)文件可以编辑
[email protected]> select name,path from v$asm_disk;

NAME                           PATH
-------                        ----------
DG_A_0000                      /dev/rcrm5_raw01_100g
DG_B_0000                      /dev/rcrm5_raw02_100g
DG_B_0001                      /dev/rcrm5_raw03_100g
                               /dev/rcrm5_raw04_100g

kfed read /dev/rcrm5_raw01_100g > /home/oracle/tcyang/asmbak/rcrm5_raw01_100g.txt
kfed read /dev/rcrm5_raw02_100g > /home/oracle/tcyang/asmbak/rcrm5_raw02_100g.txt
kfed read /dev/rcrm5_raw03_100g > /home/oracle/tcyang/asmbak/rcrm5_raw03_100g.txt
kfed read /dev/rcrm5_raw04_100g > /home/oracle/tcyang/asmbak/rcrm5_raw04_100g.txt

--reccover:恢复磁盘元数据 注意:磁盘大小和名字要一样(写入磁盘信息)
kfed merge /oracle/oradata/asmdisk04 text=asmdisk04.new.txt

--示例如下:
启动磁盘组,报错使用kfed read命令,备份disk0的header,然后手工编辑备份文件,改成disk1相关的内容,最后使用kfed merge还原disk1的 header
kfed read /oracle/oradata/asmdisk04 > asmdisk04.new.txt

手工修改asmdisk04.new.txt的相关内容
kfed merge /oracle/oradata/asmdisk04 text=asmdisk04.new.txt

alter diskgroup dg_a mount;
alter diskgroup dg_b mount;

--RMAN 恢复数据




你可能感兴趣的:(oracle,header,Path,merge,disk,磁盘)