The ovm_reporestore utility allows the administrator to easily back up metadata about assemblies, ISO files and virtual disks that are stored in a given storage repository. The resulting XML file can then be used to restore this data to an Oracle VM Manager instance in the case that the repository imported into the Oracle VM Manager afresh. Typical use cases would be for back up and restore or disaster recovery, or alternately where the storage for the repository is moved to an alternate location or to a clone of the environment. The utility works in two modes:
A back up mode, where the metadata is dumped to an XML file. Ideally, this should be run as a regular cronjob, so that the data is consistently backed up.
A restore mode, where the metadata stored in the XML file is imported into an Oracle VM Manager instance to update the information stored for assemblies, ISO files and virtual disks with matching UUIDs.
Syntax
ovm_reporestore
{
-u
} {
username
-p
|
password
-E
} {
-h
} {
hostname
-r
|
repository
-a
} [
-f
] [
filename.xml
-F
] [
OVMModelDump.xml
-y
] [
-D
] [
-R
] [
-N
]
Options
The following table shows the available options for this command.
Option | Description |
---|---|
| The username of an Oracle VM Manager admin user. This option is required. |
{
|
The # export OVMUTIL_PASS=
This option is required. |
| The hostname of the server running Oracle VM Manager. This option is required. |
{
|
The |
| The XML file to read or write to. |
| Use an Oracle VM Manager model dump XML file as input |
| Assume yes on restoring a filename and description without prompting. |
| Dump metadata to a file. This command is intended to be used in combination with:
|
| Restore metadata from file. This command is intended to be used in combination with:
|
| Fix metadata after a refresh without an XML file. This command is intended to be used in combination with:
|
Examples
Example 2.7 Backing up metadata for all repositories to an XML file
This example shows how to dump all of the metadata stored across all repositories to an XML file.
# ./ovm_reporestore -u admin -E -h localhost -D -f /tmp/dump2.xml -a
Oracle VM Repository Repair utility version
.
Connected.
Export mode.
Processing repository 'iscsirepo'
->Processing assemblies.
->Processing Virtual ISOs.
->Processing Virtual Disks.
Processing repository 'MyRepository'
->Processing assemblies.
->Processing Virtual ISOs.
->Processing Virtual Disks.
Processing repository 'nfs1'
->Processing assemblies.
->Processing Virtual ISOs.
->Processing Virtual Disks.
Wrote to '/tmp/dump2.xml'
Finished...
Example 2.8 Restoring metadata from data in an XML file
This example shows how to restore the names and descriptions
for assemblies, ISOs and virtual disks that have the same
UUIDs as those stored in the provided XML file across all
repositories. As it is used without the -y
option, the user is prompted with the option to update the
name and description of each matching item in a repository.
# ./ovm_reporestore -u admin -E -h localhost -R -f /tmp/dump2.xml -a
Oracle VM Repository Repair utility version
.
Connected.
Repair mode.
Reading from '/tmp/dump2.xml'
Processing repository 'iscsirepo'
->Processing assemblies.
->Processing Virtual ISOs.
->Processing Virtual Disks.
Processing repository 'MyRepository'
->Processing assemblies.
->Processing Virtual ISOs.
->Processing Virtual Disks.
Processing repository 'nfs1'
->Processing assemblies.
->Processing Virtual ISOs.
->Processing Virtual Disks.
The following element has no name: '0004fb0000120000ea4a4a161bdf8de7.img'
Element found. Name : '0004fb0000120000ea4a4a161bdf8de7.img' Description : ''
Are you sure you want to modify this entry? [y/N] n
Skipping element.
Finished...