LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

vgcfgrestore

Restore LVM volume group metadata

TLDR

Restore from last backup
$ sudo vgcfgrestore [vg_name]
copy
Restore from file
$ sudo vgcfgrestore -f [path/to/file] [vg_name]
copy
List all backups
$ sudo vgcfgrestore -l [vg_name]
copy
List specific backup file
$ sudo vgcfgrestore -l -f [path/to/file] [vg_name]
copy

SYNOPSIS

vgcfgrestore [OPTIONS] VGNAME_

DESCRIPTION

vgcfgrestore restores LVM volume group configuration from a text backup file produced by vgcfgbackup. This restores the volume group structure, not the actual user data.The command is useful for recovering from metadata corruption or recreating volume group configurations after disk replacement.

PARAMETERS

-f, --file FILE

Read metadata backup from the named file.
-l, --list
List metadata backup and archive files pertaining to the VG.
--force
Force metadata restore even with thin pool LVs. Use with extreme caution.
-M, --metadatatype lvm2
Specify the type of on-disk metadata to use.
-t, --test
Run in test mode. Commands will not update metadata.
-d, --debug
Set debug level. Repeat from 1 to 6 times to increase detail.

CAVEATS

Only restores metadata, not data. Requires root privileges. Physical volumes must exist for restore to succeed. Data may be lost if metadata is inconsistent with disk contents.

SEE ALSO

Copied to clipboard
Kai