evms_metadata_restore

Langue: en

Version: 2004-12-13 (openSuse - 09/10/07)

Section: 8 (Commandes administrateur)

NAME

evms_metadata_restore - Restore the metadata used to create EVMS objects, containers, and volumes.

SYNOPSIS

evms_metadata_restore [options] [thing_name ...]


options:

  [-a, --all]

  [-d debug_level, --debug-level debug_level]

        debug_level = [0-9] |

                      [critical | serious | error | warning | default |

                       details | entry_exit | debug | extra | everything]

  [-D date/time, --date date/time]

  [-f metadata_file_name, --metadata-file metadata_file_name]

  [-l log_file_name, --log-file log_file_name]

  [-L, --list]

  [-p, --parents]

  [-r, --recursive]

  [-s, --single]

  [-q, --quiet] quiet mode

  [-v, --verbose] verbose mode

  [-h | -? | --help] display this help



thing_name:

  A list of the names of objects, containers, and/or volumes to be restored

DESCRIPTION

Use the evms_metadata_restore utility to restore the metadata that are used to build the segments (partitions), regions, containers (groups), and volumes in the system.

OPTIONS

The following options can be used with evms_metadata_restore:

-a, --all
Restore the metadata for all objects, containers, and volumes. You must use -a if you do not give any thing names.
-d, --debug-level debug_level
Specify the amount of information that should be written to the log file. A numerical value between 0 and 9 can be specified, where a larger number generates more logging information. The following text values are also allowed:

critical

serious

error

warning

default

details

entry_exit

debug

extra

everything

"Critical" generates the least information and "everything" generates the most information. The default debug level is "default" or "5."

-D date/time, --date date/time
Use backup file that is the most recent to the date/time. The date/time is in the current locale's format for the date and time or in the format yyyy/mm/md[ HH:MM:SS].
-f file_name, --metadata-file file_name
If <file_name> contains any slashes ('/'), open <file_name>.
If <file_name> does not contain a slash ('/'), first attempt to open <file_name> in the current directory. If the file does not exist, open <file_name> in the default directory.
If neither -D nor -f is used, use the latest file in the default directory.
The default directory is /var/evms/metadata_backups/ unless it is overridden by the "metadata_backup_dir" variable in the "engine" section of /etc/evms.conf.
-l, --log-file log_file_name
Specify the location of the log file. The default value is /var/log/evms-engine.log.
-L, --list
Print the contents of the metadata file to standard out. -L cannot be used with -r nor with -s.
-p, --parents
Restore the parent(s) built from the things rather than the metadata to build the things themselves.
-r, --recursive
Restore the metadata to build the things as well as restoring any metadata to build the children of the things.
If -p is used, restore all the parents built from the list of things and then recursively restore all the parents build from those parents.
-r cannot be used with -s nor with -L.
-r is the default behavior.
-s, --single
Restore only the metadata needed to build the things from their child objects. Do not restore the metadata to build the child objects.
If -p is used, restore any parents built from the things.
-s cannot be used with -r nor with -L.
-q, --quiet
Display only error messages.
-v, --verbose
Display verbose status information about the progress of the restore.
-h, -?, --help
Display a summary of the options available for evms_metadata_restore.

PARAMETERS

thing_name
A list of the names of objects, containers, and/or volumes to be restored

EXAMPLES

evms_metadata_restore -L


Print the contents of the metadata backup file in a human readable form.



Output:



        ...

        

Entry #:  2

Parent:   hda_mbr

Child:    hda

Offset:   0

Length:   1



Metadata:

00000000  eb 48 90 00 c0 07 4c 49  4c 4f 01 00 15 06 91 00  |ëH..À.LILO......|

00000010  00 00 00 00 e2 a6 98 3b  85 67 b0 bc 00 86 67 b0  |....â¦.;.g°¼..g°|

00000020  bc 00 84 67 b0 bc 00 01  ff ff 88 67 b0 bc 00 8a  |¼..g°¼.....g°¼..|

00000030  67 b0 bc 00 fd eb b0 bb  00 fe eb b0 bb 00 03 02  |g°¼.ýë°».þë°»...|

00000040  ff 00 00 20 01 00 00 00  00 02 fa ea 50 7c 00 00  |... ......úêP|..|

        ...

The offset and length are in units of 512-byte sectors.

evms_metadata_restore -a

Restore all the metadata from the latest backup file in the default directory.

evms_metadata_restore -a -m /root/backups/evms/2004-06-05

Restore all the metadata from file /root/backups/evms/2004-06-05.

evms_metadata_restore -a -D 2004/04/10

In this example, the last metadata backup on 2004/04/10 was made at 08:28:12. Restore all the metadata from file /var/evms/metadata-backups/evms-metadata-2004-04-10-08.28.12.

evms_metadata_restore hda5_bbr

Get the latest metadata backup file and restore all the metadata needed to build object hda5_bbr. Recursively restore any metadata for objects on which hda5_bbr depends.
In this example, hda5_bbr is built from segment hda5 which comes from disk hda. evms_metadata_restore will first restore onto hda the metadata necessary to build hda5. Then it will restore the metadata on hda5 needed to build hda5_bbr.

evms_metadata_restore -s hda5_bbr

Get the latest metadata backup file and restore all the metadata needed to build object hda5_bbr. Do not restore any metadata for objects on which hda5_bbr depends.
In this example, hda5_bbr is built from segment hda5 which comes from disk hda. evms_metadata_restore will only restore the metadata on hda5 needed to build hda5_bbr. It will not restore the metadata to build hda5.

evms_metadata_restore -p hda5

Get the latest metadata backup file and restore the metadata for all of the things that are built from object hda5. Recursively restore any metadata for objects built on the parent objects that were produced from restoring the metadata on hda5.
In this example, volume /dev/evms/Data is built from hda5_bbr which is built from segment hda5 which comes from disk hda. evms_metadata_restore will first restore onto hda5 the metadata necessary to build hda5_bbr. Then it will restore the metadata on hda5_bbr needed to build volume /dev/evms/Data.

evms_metadata_restore -p -s hda5

Get the latest metadata backup file and restore the metadata for all of the things that are built from object hda5. Do not restore any metadata for objects that were built from hda5.
In this example, volume /dev/evms/Data is built from hda5_bbr which is built from segment hda5 which comes from disk hda. evms_metadata_restore will only restore the metadata on hda5 needed to build hda5_bbr. It will not restore the metadata to build /dev/evms/Data.

SEE ALSO

evms_metadata_backup(8), evms(8), http://evms.sourceforge.net/

AUTHOR

Steve Dobbelstein