Purpose
The md_restore command restores disk groups from a metadata backup file.
Syntax and Description
md_restore backup_file [--silent] [--full|--nodg|--newdg -o 'old_diskgroup:new_diskgroup [,...]'] [-S sql_script_file] [-G 'diskgroup [,diskgroup...]']
Table 10-53 describes the options for the md_restore command.
Table 10-53 Options for the md_restore command
| Option | Description |
|---|---|
|
|
Reads the metadata information from |
|
|
Ignore errors. Typically, if |
|
|
Specifies to create a disk group and restore metadata. |
|
|
Specifies to restore metadata only. |
|
|
Specifies to create a disk group with a different name when restoring metadata. The |
|
|
Write SQL commands to the specified SQL script file instead of executing the commands. |
|
|
Select the disk groups to be restored. If no disk groups are defined, then all disk groups are restored. |
Example
The first example restores the disk group data from the backup script and creates a copy. The second example takes an existing disk group data and restores its metadata. The third example restores disk group data completely but the new disk group that is created is named data2. The fourth example restores from the backup file after applying the overrides defined in the override.sql script file.
Example 10-62 Using the ASMCMD md_restore command
ASMCMD [+] > md_restore –-full –G data –-silent /scratch/backup/alldgs20100422 ASMCMD [+] > md_restore –-nodg –G data –-silent /scratch/backup/alldgs20100422 ASMCMD [+] > md_restore –-newdg -o 'data:data2' --silent /scratch/backup/data20100422 ASMCMD [+] > md_restore -S override.sql --silent /scratch/backup/data20100422