With 11g R2 , Oracle provided two new commands md_backup and md_restore , which can be used within the ASMCMD utility to backup and restore the disk group metadata .
[grid@node1 ~]$ asmcmd md_backup /tmp/asmbackups/databkps2 -G DATA
Disk group metadata to be backed up: DATA
Current alias directory path: _MGMTDB/TEMPFILE
Current alias directory path: _MGMTDB
Current alias directory path: RACDB/ONLINELOG
Current alias directory path: RACDB/PARAMETERFILE
Current alias directory path: node-cluster/ASMPARAMETERFILE
Current alias directory path: node-cluster
Current alias directory path: RACDB/CONTROLFILE
Current alias directory path: RACDB
Current alias directory path: ASM/PASSWORD
Current alias directory path: RACDB/TEMPFILE
Current alias directory path: _MGMTDB/CONTROLFILE
Current alias directory path: _MGMTDB/PARAMETERFILE
Current alias directory path: RACDB/PASSWORD
Current alias directory path: RACDB/DATAFILE
Current alias directory path: _MGMTDB/DATAFILE
Current alias directory path: node-cluster/OCRFILE
Current alias directory path: _MGMTDB/ONLINELOG
Current alias directory path: ASM
[grid@node1 ~]$
[grid@node1 ~]$ ls -l /tmp/asmbackups/databkps2
-rw-r--r-- 1 grid oinstall 19098 Sep 2 02:59 /tmp/asmbackups/databkps2
[grid@node1 ~]$ asmcmd md_backup /tmp/asmbackups/datapbkps
Disk group metadata to be backed up: OCRVOTE
Disk group metadata to be backed up: DATA
Current alias directory path: node-cluster/ASMPARAMETERFILE
Current alias directory path: node-cluster
Current alias directory path: node-cluster/OCRFILE
Current alias directory path: _MGMTDB/TEMPFILE
Current alias directory path: _MGMTDB
Current alias directory path: RACDB/ONLINELOG
Current alias directory path: RACDB/PARAMETERFILE
Current alias directory path: node-cluster/ASMPARAMETERFILE
Current alias directory path: node-cluster
Current alias directory path: RACDB/CONTROLFILE
Current alias directory path: RACDB
Current alias directory path: ASM/PASSWORD
Current alias directory path: RACDB/TEMPFILE
Current alias directory path: _MGMTDB/CONTROLFILE
Current alias directory path: _MGMTDB/PARAMETERFILE
Current alias directory path: RACDB/DATAFILE
Current alias directory path: RACDB/PASSWORD
Current alias directory path: _MGMTDB/DATAFILE
Current alias directory path: node-cluster/OCRFILE
Current alias directory path: _MGMTDB/ONLINELOG
Current alias directory path: ASM
[grid@node1 ~]$
[grid@node1 ~]$ ls -lrth /tmp/asmbackups/datapbkps
-rw-r--r-- 1 grid oinstall 32K Sep 2 03:01 /tmp/asmbackups/datapbkps
[grid@node1 ~]$
md_restore :
To restore entire diskgroup settings :
md_restore --full -G data /tmp/asmbackups/databkps
Recreates DATA diskgroup and its metadata :
md_resore -nodeg -G data /tmp/asmbackups/databkps
Re-creates only metadata for the data disk group :
md_restore --newdg -o 'data:data2' /tmp/asmbackups/databkps
This example helps you to re-create full DATA diskgroup into a new diskgroup named data2
[grid@node1 ~]$ asmcmd md_backup /tmp/asmbackups/databkps2 -G DATA
Disk group metadata to be backed up: DATA
Current alias directory path: _MGMTDB/TEMPFILE
Current alias directory path: _MGMTDB
Current alias directory path: RACDB/ONLINELOG
Current alias directory path: RACDB/PARAMETERFILE
Current alias directory path: node-cluster/ASMPARAMETERFILE
Current alias directory path: node-cluster
Current alias directory path: RACDB/CONTROLFILE
Current alias directory path: RACDB
Current alias directory path: ASM/PASSWORD
Current alias directory path: RACDB/TEMPFILE
Current alias directory path: _MGMTDB/CONTROLFILE
Current alias directory path: _MGMTDB/PARAMETERFILE
Current alias directory path: RACDB/PASSWORD
Current alias directory path: RACDB/DATAFILE
Current alias directory path: _MGMTDB/DATAFILE
Current alias directory path: node-cluster/OCRFILE
Current alias directory path: _MGMTDB/ONLINELOG
Current alias directory path: ASM
[grid@node1 ~]$
-rw-r--r-- 1 grid oinstall 19098 Sep 2 02:59 /tmp/asmbackups/databkps2
[grid@node1 ~]$ asmcmd md_backup /tmp/asmbackups/datapbkps
Disk group metadata to be backed up: OCRVOTE
Disk group metadata to be backed up: DATA
Current alias directory path: node-cluster/ASMPARAMETERFILE
Current alias directory path: node-cluster
Current alias directory path: node-cluster/OCRFILE
Current alias directory path: _MGMTDB/TEMPFILE
Current alias directory path: _MGMTDB
Current alias directory path: RACDB/ONLINELOG
Current alias directory path: RACDB/PARAMETERFILE
Current alias directory path: node-cluster/ASMPARAMETERFILE
Current alias directory path: node-cluster
Current alias directory path: RACDB/CONTROLFILE
Current alias directory path: RACDB
Current alias directory path: ASM/PASSWORD
Current alias directory path: RACDB/TEMPFILE
Current alias directory path: _MGMTDB/CONTROLFILE
Current alias directory path: _MGMTDB/PARAMETERFILE
Current alias directory path: RACDB/DATAFILE
Current alias directory path: RACDB/PASSWORD
Current alias directory path: _MGMTDB/DATAFILE
Current alias directory path: node-cluster/OCRFILE
Current alias directory path: _MGMTDB/ONLINELOG
Current alias directory path: ASM
[grid@node1 ~]$
[grid@node1 ~]$ ls -lrth /tmp/asmbackups/datapbkps
-rw-r--r-- 1 grid oinstall 32K Sep 2 03:01 /tmp/asmbackups/datapbkps
[grid@node1 ~]$
md_restore :
To restore entire diskgroup settings :
md_restore --full -G data /tmp/asmbackups/databkps
Recreates DATA diskgroup and its metadata :
md_resore -nodeg -G data /tmp/asmbackups/databkps
Re-creates only metadata for the data disk group :
md_restore --newdg -o 'data:data2' /tmp/asmbackups/databkps
This example helps you to re-create full DATA diskgroup into a new diskgroup named data2
No comments:
Post a Comment