1VGCFGRESTORE(8)             System Manager's Manual            VGCFGRESTORE(8)
2
3
4

NAME

6       vgcfgrestore — Restore volume group configuration
7

SYNOPSIS

9       vgcfgrestore option_args position_args
10           [ option_args ]
11           [ position_args ]
12
13           --commandprofile String
14           --config String
15        -d|--debug
16           --devices PV
17           --devicesfile String
18           --driverloaded y|n
19        -f|--file String
20           --force
21        -h|--help
22           --journal String
23        -l|--list
24           --lockopt String
25           --longhelp
26        -M|--metadatatype lvm2
27           --nohints
28           --nolocking
29           --profile String
30        -q|--quiet
31        -t|--test
32        -v|--verbose
33           --version
34        -y|--yes
35

DESCRIPTION

37       vgcfgrestore  restores  the  metadata  of a VG from a text back up file
38       produced by vgcfgbackup. This  writes  VG  metadata  onto  the  devices
39       specifed in back up file.
40
41       A  back  up  file  can  be specified with --file.  If no backup file is
42       specified, the most recent one is used. Use --list for a  list  of  the
43       available back up and archive files of a VG.
44
45       WARNING: When a VG contains thin pools, changes to thin metadata cannot
46       be reverted, and data loss may occur if thin metadata has changed.  The
47       force option is required to restore in this case.
48

USAGE

50       Restore VG metadata from last backup.
51
52       vgcfgrestore VG
53           [ COMMON_OPTIONS ]
54
55
56
57       Restore VG metadata from specified file.
58
59       vgcfgrestore -f|--file String VG
60           [ COMMON_OPTIONS ]
61
62
63
64       List all VG metadata backups.
65
66       vgcfgrestore -l|--list VG
67           [ COMMON_OPTIONS ]
68
69
70
71       List one VG metadata backup file.
72
73       vgcfgrestore -l|--list -f|--file String
74           [ COMMON_OPTIONS ]
75           [ VG ]
76
77
78
79       Common options for command:
80           [ -M|--metadatatype lvm2 ]
81           [    --force ]
82
83       Common options for lvm:
84           [ -d|--debug ]
85           [ -h|--help ]
86           [ -q|--quiet ]
87           [ -t|--test ]
88           [ -v|--verbose ]
89           [ -y|--yes ]
90           [    --commandprofile String ]
91           [    --config String ]
92           [    --devices PV ]
93           [    --devicesfile String ]
94           [    --driverloaded y|n ]
95           [    --journal String ]
96           [    --lockopt String ]
97           [    --longhelp ]
98           [    --nohints ]
99           [    --nolocking ]
100           [    --profile String ]
101           [    --version ]
102

OPTIONS

104       --commandprofile String
105              The  command  profile  to  use  for  command configuration.  See
106              lvm.conf(5) for more information about profiles.
107
108       --config String
109              Config settings for the command. These override lvm.conf(5) set‐
110              tings.   The  String arg uses the same format as lvm.conf(5), or
111              may use section/field syntax.  See lvm.conf(5) for more informa‐
112              tion about config.
113
114       -d|--debug ...
115              Set debug level. Repeat from 1 to 6 times to increase the detail
116              of messages sent to the log file and/or syslog (if configured).
117
118       --devices PV
119              Restricts the devices that are visible  and  accessible  to  the
120              command.  Devices not listed will appear to be missing. This op‐
121              tion can be repeated, or accepts a comma separated list  of  de‐
122              vices. This overrides the devices file.
123
124       --devicesfile String
125              A file listing devices that LVM should use.  The file must exist
126              in /etc/lvm/devices/ and is managed with the lvmdevices(8)  com‐
127              mand.   This  overrides  the lvm.conf(5) devices/devicesfile and
128              devices/use_devicesfile settings.
129
130       --driverloaded y|n
131              If set to no, the command will not attempt to use device-mapper.
132              For testing and debugging.
133
134       -f|--file String
135              Read metadata backup from the named file.  Usually this file was
136              created by vgcfgbackup.
137
138       --force ...
139              Force metadata restore even with thin pool LVs.   Use  with  ex‐
140              treme caution. Most changes to thin metadata cannot be reverted.
141              You may lose data if you restore metadata that  does  not  match
142              the thin pool kernel metadata precisely.
143
144       -h|--help
145              Display help text.
146
147       --journal String
148              Record  information in the systemd journal.  This information is
149              in addition to information enabled by the  lvm.conf  log/journal
150              setting.   command:  record information about the command.  out‐
151              put: record the default command output.  debug: record full com‐
152              mand debugging.
153
154       -l|--list
155              List  metadata  backup  and  archive files pertaining to the VG.
156              May be used with --file. Does not restore the VG.
157
158       --lockopt String
159              Used to pass options for special cases to  lvmlockd.   See  lvm‐
160              lockd(8) for more information.
161
162       --longhelp
163              Display long help text.
164
165       -M|--metadatatype lvm2
166              Specifies the type of on-disk metadata to use.  lvm2 (or just 2)
167              is the current, standard format.  lvm1 (or just 1) is no  longer
168              used.
169
170       --nohints
171              Do  not  use the hints file to locate devices for PVs. A command
172              may read more devices to find PVs when hints are not  used.  The
173              command will still perform standard hint file invalidation where
174              appropriate.
175
176       --nolocking
177              Disable locking. Use with caution, concurrent commands may  pro‐
178              duce incorrect results.
179
180       --profile String
181              An alias for --commandprofile or --metadataprofile, depending on
182              the command.
183
184       -q|--quiet ...
185              Suppress output and log messages. Overrides --debug  and  --ver‐
186              bose.   Repeat  once  to  also  suppress any prompts with answer
187              'no'.
188
189       -t|--test
190              Run in test mode. Commands will not update  metadata.   This  is
191              implemented  by  disabling all metadata writing but nevertheless
192              returning success to the calling function. This may lead to  un‐
193              usual  error messages in multi-stage operations if a tool relies
194              on reading back metadata it believes has changed but hasn't.
195
196       -v|--verbose ...
197              Set verbose level. Repeat from 1 to 4 times to increase the  de‐
198              tail of messages sent to stdout and stderr.
199
200       --version
201              Display version information.
202
203       -y|--yes
204              Do  not  prompt for confirmation interactively but always assume
205              the answer yes. Use with extreme caution.   (For  automatic  no,
206              see -qq.)
207

VARIABLES

209       VG     Volume Group name.  See lvm(8) for valid names.
210
211       String See the option description for information about the string con‐
212              tent.
213
214       Size[UNIT]
215              Size is an input number that accepts an  optional  unit.   Input
216              units are always treated as base two values, regardless of capi‐
217              talization, e.g. 'k' and 'K' both refer to  1024.   The  default
218              input unit is specified by letter, followed by |UNIT.  UNIT rep‐
219              resents other possible input units: b|B is bytes, s|S is sectors
220              of  512  bytes,  k|K is KiB, m|M is MiB, g|G is GiB, t|T is TiB,
221              p|P is PiB, e|E is EiB.  (This should not be confused  with  the
222              output  control  --units, where capital letters mean multiple of
223              1000.)
224

ENVIRONMENT VARIABLES

226       See lvm(8) for information about environment  variables  used  by  lvm.
227       For example, LVM_VG_NAME can generally be substituted for a required VG
228       parameter.
229

NOTES

231       To replace PVs, vgdisplay --partial --verbose will show the  UUIDs  and
232       sizes  of any PVs that are no longer present. If a PV in the VG is lost
233       and you wish to substitute another of the same size, use pvcreate --re‐
234       storefile  filename --uuid uuid (plus additional arguments as appropri‐
235       ate) to initialise it with the same UUID as the missing PV. Repeat  for
236       all other missing PVs in the VG.  Then use vgcfgrestore --file filename
237       to restore the VG's metadata.
238

SEE ALSO

240       lvm(8), lvm.conf(5), lvmconfig(8), lvmdevices(8),
241
242       pvchange(8), pvck(8), pvcreate(8), pvdisplay(8), pvmove(8),
243       pvremove(8), pvresize(8), pvs(8), pvscan(8),
244
245       vgcfgbackup(8), vgcfgrestore(8), vgchange(8), vgck(8), vgcreate(8),
246       vgconvert(8), vgdisplay(8), vgexport(8), vgextend(8), vgimport(8),
247       vgimportclone(8), vgimportdevices(8), vgmerge(8), vgmknodes(8),
248       vgreduce(8), vgremove(8), vgrename(8), vgs(8), vgscan(8), vgsplit(8),
249
250       lvcreate(8), lvchange(8), lvconvert(8), lvdisplay(8), lvextend(8),
251       lvreduce(8), lvremove(8), lvrename(8), lvresize(8), lvs(8), lvscan(8),
252
253       lvm-fullreport(8), lvm-lvpoll(8), blkdeactivate(8), lvmdump(8),
254
255       dmeventd(8), lvmpolld(8), lvmlockd(8), lvmlockctl(8), cmirrord(8),
256       lvmdbusd(8), fsadm(8),
257
258       lvmsystemid(7), lvmreport(7), lvmraid(7), lvmthin(7), lvmcache(7)
259
260
261
262Red Hat, Inc.        LVM TOOLS 2.03.18(2)-git (2022-11-10)     VGCFGRESTORE(8)
Impressum