Linux "vgcfgrestore" Command Line Options and Examples
Restore volume group configuration

vgcfgrestore restores the metadata of a VG from a text back up file produced by vgcfgbackup. This writes VG metadata onto the devices specifed in back up file. A back up file can be specified with --file.


Usage:

vgcfgrestore option_args position_args
[ option_args ]
[ position_args ]






Command Line Options:

--commandprofile
The command profile to use for command configuration. See lvm.conf(5) for more information about pro‐files.
vgcfgrestore --commandprofile ...
--config
Config settings for the command. These override lvm.conf settings. The String arg uses the same formatas lvm.conf, or may use section/field syntax. See lvm.conf(5) for more information about config.
vgcfgrestore --config ...
-d|--debug
Set debug level. Repeat from 1 to 6 times to increase the detail of messages sent to the log fileand/or syslog (if configured).
vgcfgrestore -d|--debug ...
--driverloaded
If set to no, the command will not attempt to use device-mapper. For testing and debugging.
vgcfgrestore --driverloaded ...
-f|--file
Read metadata backup from the named file. Usually this file was created by vgcfgbackup.
vgcfgrestore -f|--file ...
--force
Force metadata restore even with thin pool LVs. Use with extreme caution. Most changes to thin meta‐data cannot be reverted. You may lose data if you restore metadata that does not match the thin poolkernel metadata precisely.
vgcfgrestore --force ...
-h|--help
Display help text.
vgcfgrestore -h|--help ...
-l|--list
List metadata backup and archive files pertaining to the VG. May be used with --file. Does not restorethe VG.
vgcfgrestore -l|--list ...
--longhelp
Display long help text.
vgcfgrestore --longhelp ...
-M|--metadatatype
Specifies the type of on-disk metadata to use. lvm2 (or just 2) is the current, standard format. lvm1(or just 1) is a historical format that can be used for accessing old data.
vgcfgrestore -M|--metadatatype ...
--profile
An alias for --commandprofile or --metadataprofile, depending on the command.
vgcfgrestore --profile ...
-q|--quiet
Suppress output and log messages. Overrides --debug and --verbose. Repeat once to also suppress anyprompts with answer 'no'.
vgcfgrestore -q|--quiet ...
-t|--test
Run in test mode. Commands will not update metadata. This is implemented by disabling all metadatawriting but nevertheless returning success to the calling function. This may lead to unusual error mes‐sages in multi-stage operations if a tool relies on reading back metadata it believes has changed buthasn't.
vgcfgrestore -t|--test ...
-v|--verbose
Set verbose level. Repeat from 1 to 4 times to increase the detail of messages sent to stdout andstderr.
vgcfgrestore -v|--verbose ...
--version
Display version information.
vgcfgrestore --version ...
-y|--yes
Do not prompt for confirmation interactively but always assume the answer yes. Use with extreme cau‐tion. (For automatic no, see -qq.)VARIABLESVGVolume Group name. See lvm(8) for valid names.StringSee the option description for information about the string content.Size[UNIT]Size is an input number that accepts an optional unit. Input units are always treated as base two val‐ues, regardless of capitalization, e.g. 'k' and 'K' both refer to 1024. The default input unit isspecified by letter, followed by |UNIT. UNIT represents other possible input units: bBsSkKmMgGtTpPeE.b|B is bytes, s|S is sectors of 512 bytes, k|K is kilobytes, m|M is megabytes, g|G is gigabytes, t|T isterabytes, p|P is petabytes, e|E is exabytes. (This should not be confused with the output control
vgcfgrestore -y|--yes ...
--units,
ENVIRONMENT VARIABLESSee lvm(8) for information about environment variables used by lvm. For example, LVM_VG_NAME can generally besubstituted for a required VG parameter.NOTESTo replace PVs, vgdisplay --partial --verbose will show the UUIDs and sizes of any PVs that are no longerpresent. If a PV in the VG is lost and you wish to substitute another of the same size, use pvcreate
vgcfgrestore --units, ...