1WIMCAPTURE(1)                    User Commands                   WIMCAPTURE(1)
2
3
4

NAME

6       wimcapture, wimappend - Capture or append a WIM image
7

SYNOPSIS

9       wimcapture SOURCE WIMFILE [IMAGE_NAME  [IMAGE_DESC]] [OPTION...]
10       wimappend SOURCE WIMFILE [IMAGE_NAME  [IMAGE_DESC]] [OPTION...]
11

DESCRIPTION

13       The  wimcapture  (equivalently:  wimlib-imagex  capture)  and wimappend
14       (equivalently: wimlib-imagex append) commands create ("capture") a  new
15       Windows Imaging (WIM) image.  wimcapture creates a new WIM archive WIM‐
16       FILE to contain the new image, while wimappend adds the  image  to  the
17       existing WIM archive WIMFILE (or with --create, creating it if needed).
18
19       SOURCE specifies the location of the files from which to create the WIM
20       image.  If SOURCE is a directory or a symbolic link pointing to  a  di‐
21       rectory,  then  the image is captured from that directory as per DIREC‐
22       TORY CAPTURE (UNIX) or DIRECTORY CAPTURE (WINDOWS).   Alternatively, if
23       --source-list  is  specified, then SOURCE is interpreted as a file con‐
24       taining a list of files and directories to include in the image.  Still
25       alternatively,  if SOURCE is a UNIX block device, then an image is cap‐
26       tured from the NTFS volume on it as per NTFS VOLUME CAPTURE (UNIX).
27
28       IMAGE_NAME and IMAGE_DESC specify the name and description to give  the
29       new  image.   If IMAGE_NAME is unspecified, it defaults to the filename
30       component of SOURCE, appending a unique suffix if  needed.   Otherwise,
31       IMAGE_NAME  must  be either a name not already used by an image in WIM‐
32       FILE, or the empty string to create an unnamed image.  If IMAGE_DESC is
33       unspecified then the new image is given no description.
34
35       If  WIMFILE  is  specified as "-", then the --pipable option is assumed
36       and a pipable WIM is written to standard output (this is a  wimlib  ex‐
37       tension).
38

DIRECTORY CAPTURE (UNIX)

40       On  UNIX-like  systems,  if  SOURCE specifies a directory or a symbolic
41       link to a directory, then the WIM image will be captured from that  di‐
42       rectory.   The  directory  can be on any type of filesystem, and mount‐
43       points are followed.  In this mode, the following types of  information
44       are captured:
45
46       •   Directories and regular files, and the contents of regular files
47
48       •   Hard links
49
50       •   Symbolic links (translated losslessly to Windows reparse points)
51
52       •   Last  modification times (mtime) and last access times (atime) with
53           100 nanosecond granularity
54
55       •   Files that appear to be sparse will be flagged as such,  but  their
56           full data will still be stored, subject to the usual compression.
57
58       •   With --unix-data: standard UNIX file permissions (owner, group, and
59           mode)
60
61       •   With --unix-data: device nodes, named pipes, and sockets
62
63       •   With --unix-data: extended attributes (Linux only)
64
65       There is no support for storing last status change times  (ctimes),  or
66       hard  link  information  for symlinks (each symlink will be stored as a
67       separate file).  Also, filenames and  symlink  targets  which  are  not
68       valid  UTF-8 with the addition of surrogate codepoints are unsupported.
69       Note that if you have a  filesystem  containing  filenames  in  another
70       multibyte encoding, such as ISO-8859-1, and you wish to archive it with
71       wimlib, you may be able to mount it with an  option  which  causes  its
72       filenames to be presented as UTF-8.
73

NTFS VOLUME CAPTURE (UNIX)

75       On  UNIX-like  systems,  SOURCE may also be specified as a block device
76       (e.g.  /dev/sda3) containing an unmounted NTFS volume.  In  this  mode,
77       wimcapture  uses  libntfs-3g to capture a WIM image from root directory
78       of the NTFS volume.  In this mode, as much data and metadata as  possi‐
79       ble is captured, including NTFS-specific and Windows-specific metadata:
80
81       •   All  data  streams  of all unencrypted files, including the unnamed
82           data stream as well as all named data streams.
83
84       •   Reparse points.  See REPARSE POINTS AND SYMLINKS for details.
85
86       •   File and directory creation, access, and  modification  timestamps,
87           using the native NTFS resolution of 100 nanoseconds.
88
89       •   Windows  security  descriptors,  including  all  components (owner,
90           group, DACL, and SACL).
91
92       •   DOS/Windows file attribute flags.
93
94       •   All names of all files, including names in the Win32 namespace, DOS
95           namespace, Win32+DOS namespace, and POSIX namespace.  This includes
96           hard links.
97
98       •   Object IDs.
99
100       However, the main limitations of this mode are:
101
102       •   Encrypted files are excluded.
103
104       •   Extended attributes (EAs) are not stored yet.
105
106       •   Sparse files will be flagged as such,  but  their  full  data  will
107           still be stored, subject to the usual compression.
108
109       •   Some types of reparse points are transparently dereferenced by Win‐
110           dows but not by NTFS-3G.  See REPARSE POINTS AND SYMLINKS.
111
112       Note that this mode uses libntfs-3g directly, without going through the
113       ntfs-3g(8)  driver.  Hence, there is no special support for capturing a
114       WIM image from a directory on which an NTFS filesystem has been mounted
115       using  ntfs-3g(8); you have to unmount it first.  There is also no sup‐
116       port for capturing a subdirectory of the NTFS volume; you can only cap‐
117       ture the full volume.
118

DIRECTORY CAPTURE (WINDOWS)

120       On  Windows, wimcapture and wimappend natively support Windows-specific
121       and NTFS-specific data.  They therefore act  similarly  to  the  corre‐
122       sponding commands of Microsoft's ImageX or DISM.  For best results, the
123       directory being captured should be on an NTFS volume  and  the  program
124       should be run with Administrator privileges; however, non-NTFS filesys‐
125       tems and running without Administrator privileges are  also  supported,
126       subject to limitations.
127
128       On  Windows,  wimcapture  and wimappend try to capture as much data and
129       metadata as possible, including:
130
131       •   All data streams of all files.
132
133       •   Reparse points, if supported by the source filesystem.  See REPARSE
134           POINTS AND SYMLINKS for details.
135
136       •   File  and  directory creation, access, and modification timestamps.
137           These are stored with Windows' native timestamp resolution  of  100
138           nanoseconds.
139
140       •   Security  descriptors,  if  supported  by the source filesystem and
141           --no-acls is not specified.  Note: when not running as an  Adminis‐
142           trator,  security  descriptors  may be only partially captured (see
143           --strict-acls).
144
145       •   File attributes, including hidden, sparse,  compressed,  encrypted,
146           etc.   Encrypted files will be stored in encrypted form rather than
147           in plain text.  Transparently compressed files will be read as  un‐
148           compressed  and stored subject to the WIM's own compression.  There
149           is no special handling for  storing  sparse  files,  but  they  are
150           likely to compress to a small size.
151
152       •   DOS  names  (8.3) names of files; however, the failure to read them
153           is not considered an error condition.
154
155       •   Hard links, if supported by the source filesystem.
156
157       •   Object IDs, if supported by the source filesystem.
158
159       •   Extended attributes (EAs), if supported by the source filesystem.
160
162       A "symbolic link" (or "symlink") is a special file  which  "points  to"
163       some  other file or directory.  On Windows, a "reparse point" is a gen‐
164       eralization of a symlink which allows access to a file or directory  to
165       be  redirected  in  a more complex way.  Windows uses reparse points to
166       implement symlinks and sometimes uses them for various  other  features
167       as  well.   Normally,  applications  can  choose  whether  they want to
168       "dereference" reparse points and symlinks or not.
169
170       The default behavior of wimcapture is that reparse points and  symlinks
171       are not dereferenced, meaning that the reparse points or symlinks them‐
172       selves are stored in the archive rather than the  files  or  data  they
173       point  to.   There  is a --dereference option, but it is currently only
174       supported by the UNIX version of wimcapture on UNIX  filesystems  (it's
175       not yet implemented for Windows filesystems).
176
177       Windows also treats certain types of reparse points specially.  For ex‐
178       ample, Windows applications reading from deduplicated,  WIM-backed,  or
179       system-compressed  files always see the dereferenced data, even if they
180       ask not to.  Therefore, wimcapture on Windows will  store  these  files
181       dereferenced, not as reparse points.  But wimcapture on UNIX in NTFS-3G
182       mode cannot dereference these files and  will  store  them  as  reparse
183       points  instead.   This difference can be significant in certain situa‐
184       tions, e.g. when capturing deduplicated files which, to be readable af‐
185       ter extraction, require that the chunk store also be present.
186

OPTIONS

188       --boot
189             Mark  the  new  image  as  the  "bootable" image of the WIM.  The
190             "bootable" image is the image which the Windows  bootloader  will
191             use when loading Windows PE from the WIM.
192
193       --check
194             Include  extra  integrity information in the resulting WIM.  With
195             wimappend, also check the integrity of the WIM  before  appending
196             to  it.  Also verify the integrity of any WIMs specified by --up‐
197             date-of and/or --delta-from.
198
199       --include-integrity
200             Include extra integrity information in the  resulting  WIM,  i.e.
201             like --check but don't do any verification beforehand.
202
203       --compress=TYPE[:LEVEL]
204             With  wimcapture, use the specified compression format in the new
205             WIM file.  TYPE may be "none", "XPRESS"  (alias:  "fast"),  "LZX"
206             (alias:  "maximum"),  or  "LZMS"  (alias:  "recovery").   TYPE is
207             matched case-insensitively.  The default is "LZX".
208
209             You can optionally also specify  an  integer  compression  LEVEL.
210             The  compression  level  specifies how hard the compression algo‐
211             rithm for the specified compression TYPE will  work  to  compress
212             the data.  The values are scaled so that 20 is quick compression,
213             50 is medium compression, and 100 is high compression.   However,
214             you  can  choose  any value and not just these particular values.
215             The default is 50.
216
217             This option only affects the compression type used  in  non-solid
218             WIM  resources.   If  you  are  creating  a  solid WIM (using the
219             --solid option), then you probably want --solid-compress instead.
220
221             Be careful if you choose LZMS compression.  It is not  compatible
222             with  wimlib before v1.6.0, WIMGAPI before Windows 8, DISM before
223             Windows 8.1, and 7-Zip before v15.12.  Also  note  that  choosing
224             LZMS compression does not automatically imply solid-mode compres‐
225             sion, as it does with DISM.  Use --solid if you want to create  a
226             solid WIM, or "ESD file".
227
228       --chunk-size=SIZE
229             With  wimcapture,  use a compression chunk size of SIZE bytes.  A
230             larger compression chunk size results in a better compression ra‐
231             tio.  wimlib supports different chunk sizes depending on the com‐
232             pression type:
233
234             • XPRESS: 4K, 8K, 16K, 32K, 64K
235
236             • LZX: 32K, 64K, 128K, 256K, 512K, 1M, 2M
237
238             • LZMS: 32K, 64K, 128K, 256K, 512K, 1M, 2M,  4M,  8M,  16M,  32M,
239               64M, 128M, 256M, 512M, 1G
240
241             You  can provide the full number (e.g. 32768), or you can use one
242             of the K, M, or G suffixes.  KiB, MiB, and GiB are also accepted.
243
244             This option only affects the chunk size used in non-solid WIM re‐
245             sources.   If you are creating a solid WIM (using the --solid op‐
246             tion), then you probably want --solid-chunk-size instead.
247
248             Use this option with caution if  compatibility  with  Microsoft's
249             WIM software is desired, since their software has limited support
250             for non-default chunk sizes.
251
252       --solid
253             With wimcapture, create a "solid" WIM file that compresses  files
254             together  rather  than independently.  This results in a signifi‐
255             cantly better compression ratio, but it comes at the cost of slow
256             compression  with  very high memory usage, reduced compatibility,
257             and slow random access to the resulting WIM file.
258
259             By default this enables solid LZMS compression, thereby  creating
260             a  file  equivalent to one created with DISM's /compress:recovery
261             option.  Such files are also called "ESD files"  and  were  first
262             supported by WIMGAPI in Windows 8, by DISM in Windows 8.1, and by
263             7-Zip 15.12.
264
265       --solid-compress=TYPE[:LEVEL]
266             Like --compress, but set the compression type used in  solid  re‐
267             sources.   The default is LZMS compression.  This option only has
268             an effect when --solid is also specified.
269
270       --solid-chunk-size=SIZE
271             Like --chunk-size, but set the  chunk  size  used  in  solid  re‐
272             sources.   The  default,  assuming  LZMS  compression,  is  64MiB
273             (67108864); this requires about  640MiB  of  memory  per  thread.
274             This  option  only  has an effect when --solid is also specified.
275             Note: Microsoft's WIM software is not compatible with LZMS  chunk
276             sizes larger than 64MiB.
277
278       --threads=NUM_THREADS
279             Number  of threads to use for compressing data.  Default: autode‐
280             tect (number of available CPUs).
281
282       --rebuild
283             With wimappend, rebuild the entire WIM rather than appending  the
284             new  data  to  the  end of it.  Rebuilding the WIM is slower, but
285             will save some space that would otherwise be left as  a  hole  in
286             the WIM.  Also see wimoptimize(1).
287
288       --flags=EDITIONID
289             Specify  a  string  to use in the <FLAGS> element of the XML data
290             for the new image.
291
292       --image-property NAME=VALUE
293             Assign an arbitrary property to the new image in the XML document
294             of  the  WIM.   VALUE is the string to set as the property value.
295             NAME is the name of the image property, for example "NAME",  "DE‐
296             SCRIPTION",  or  "TOTALBYTES".   The  name  can  contain  forward
297             slashes to indicate a nested  XML  element;  for  example,  "WIN‐
298             DOWS/VERSION/BUILD" indicates the BUILD element nested within the
299             VERSION element nested within the WINDOWS element.   A  bracketed
300             number  can  be used to indicate one of several identically-named
301             elements; for example, "WINDOWS/LANGUAGES/LANGUAGE[2]"  indicates
302             the  second  "LANGUAGE"  element  nested within the "WINDOWS/LAN‐
303             GUAGES" element.  When adding a list of  elements  in  this  way,
304             they  must  be  specified in sequential order.  Note that element
305             names are case-sensitive.  This option may be specified  multiple
306             times.
307
308       --dereference
309             (UNIX-like  systems  only)  Follow symbolic links and archive the
310             files they point to, rather than archiving the links themselves.
311
312       --config=FILE
313             Specifies a configuration file (UTF-8 or UTF-16LE encoded;  plain
314             ASCII also works) for capturing the new image.  The configuration
315             file specifies files that are to be treated specially during  the
316             image capture.
317
318             The format of the configuration file is INI-style; that is, it is
319             arranged in bracketed sections.  Currently,  the  following  sec‐
320             tions are recognized:
321
322             •   [ExclusionList] ---  contains a list of path globs to exclude
323                 from capture.  If a directory is matched, both the  directory
324                 and its contents are excluded.
325
326             •   [ExclusionException] --- contains a list of path globs to in‐
327                 clude, even when the file or directory also matches a glob in
328                 [ExclusionList].   If  a  directory  is matched, then all its
329                 contents are included as well.  Files or directories within a
330                 directory  excluded  by  [ExclusionList] may even be included
331                 using this, though currently it only works for absolute globs
332                 (those  that begin with "/" or "\"); for example, "/dir/file"
333                 can be included while "/dir" can be excluded,  but  including
334                 simply "file" won't work in that case.
335
336             •   [PrepopulateList]  ---  this  does not affect capture, but if
337                 the image is applied later with --wimboot, these are globs of
338                 files  that  shall  be  extracted  normally,  not  as WIMBoot
339                 "pointer files".  If a directory is matched,  all  files  and
340                 subdirectories are also matched recursively.
341
342             Path globs may contain the '*' and '?' meta-characters.  Relative
343             globs (e.g.  *.mp3) match against a filename  in  any  directory.
344             Absolute  globs  (e.g.  /dir/file), are treated as paths starting
345             at the main directory being captured, or the  root  of  the  NTFS
346             volume for NTFS volume capture mode.  Do not use drive letters in
347             the paths; they will be ignored.  Path separators may  be  either
348             forwards slashes or backwards slashes.
349
350             Lines  beginning  with  the  '#' or ';' characters are treated as
351             comments and ignored.  Globs with whitespace in them need not  be
352             quoted;  however,  if they are, both double and single quotes are
353             accepted.
354
355             If this option is not specified the following default  configura‐
356             tion file is used:
357
358
359                    [ExclusionList]
360                    \$ntfs.log
361                    \hiberfil.sys
362                    \pagefile.sys
363                    \swapfile.sys
364                    \System Volume Information
365                    \RECYCLER
366                    \$RECYCLE.BIN
367                    \$Recycle.Bin
368                    \Windows\CSC
369
370             However, special behavior applies if --wimboot is also specified.
371             By default,  with  --wimboot  specified,  the  file  Windows/Sys‐
372             tem32/WimBootCompress.ini in the directory being captured will be
373             used as the configuration file.  However, this can be  overridden
374             using  --config; and this also causes the specified configuration
375             file to be saved in the WIM image as Windows/System32/WimBootCom‐
376             press.ini, overriding any that may be present on the filesystem.
377
378       --unix-data
379             (UNIX-like  systems  only)  Store UNIX-specific metadata and spe‐
380             cial  files.   This  includes:  standard  UNIX  file  permissions
381             (owner, group, and mode); device nodes, named pipes, and sockets;
382             and extended attributes (Linux only).  This information can later
383             be restored by wimapply with the --unix-data option.
384
385             UNIX-specific  information is ignored by Microsoft's WIM software
386             and by the Windows version of wimlib.
387
388       --no-acls
389             Do not capture files' security descriptors.
390
391       --strict-acls
392             Fail immediately if the full security descriptor of any file can‐
393             not  be  read.  On Windows, the default behavior without this op‐
394             tion is to first try omitting the SACL from the security descrip‐
395             tor,  then to try omitting the security descriptor entirely.  The
396             purpose of this is to capture as much data  as  possible  without
397             always  requiring  Administrator privileges.  However, if you de‐
398             sire that all security descriptors be captured exactly,  you  may
399             wish  to  provide  this option, although the Administrator should
400             have permission to read everything anyway.
401
402       --rpfix, --norpfix
403             Set whether to fix targets of absolute  symbolic  links  (reparse
404             points  in  Windows terminology) or not.  When enabled (--rpfix),
405             absolute symbolic links that point inside the directory tree  be‐
406             ing captured will be adjusted to be absolute relative to the root
407             of the directory tree being captured.  When disabled (--norpfix),
408             absolute symbolic links will be captured exactly as is.
409
410             The default behavior of wimcapture is equivalent to --rpfix.  The
411             default behavior of wimappend is equivalent to --rpfix if reparse
412             point  fixups  have  previously  been  done on WIMFILE, otherwise
413             --norpfix.
414
415             In the case of a multi-source capture, (--source-list specified),
416             passing  --norpfix is recommended.  Otherwise, reparse point fix‐
417             ups will be disabled on all capture sources destined for non-root
418             locations  in  the  WIM image, while capture sources destined for
419             the WIM root will get the  default  behavior  from  the  previous
420             paragraph.
421
422       --source-list
423             wimcapture and wimappend support creating a WIM image from multi‐
424             ple separate files or directories.  When --source-list is  speci‐
425             fied, the SOURCE argument specifies the name of a text file, each
426             line of which is either 1 or 2 whitespace separated  file  paths.
427             The  first file path, the source, specifies the path to a file or
428             directory to capture into the WIM image.  It may be either  abso‐
429             lute  or  relative  to the current working directory.  The second
430             file path, if provided, is the target and specifies the path   in
431             the  WIM  image  that  this  file  or directory will be saved as.
432             Leading and trailing slashes in the target are ignored, except if
433             it  consists entirely of slashes (e.g. "/"), which indicates that
434             the directory is to become the root of the WIM image.   If  omit‐
435             ted, the target string defaults to the same as the source string.
436
437             An example source list file is as follows:
438
439
440                    # Make the WIM image from the 'winpe' directory
441                    winpe     /
442
443                    # Send the 'overlay' directory to '/overlay' in the WIM image
444                    overlay   /overlay
445
446                    # Overlay a separate directory directly on the root of the WIM image.
447                    /data/stuff    /
448
449             Subdirectories in the WIM are created as needed.  Multiple source
450             directories may share the same target, which implies an  overlay.
451             In the event that this results a nondirectory file being added to
452             the WIM image multiple times, the last version (as listed in  the
453             source list file) overrides any earlier version.
454
455             File paths containing whitespace may be quoted with either single
456             quotes or double quotes.  Quotes may not be escaped.
457
458             Lines consisting only of whitespace and lines beginning with  '#'
459             preceded by optional whitespace are ignored.
460
461             As a special case, if SOURCE is "-", the source list is read from
462             standard input rather than an external file.
463
464             The NTFS volume capture mode on UNIX-like systems cannot be  used
465             with  --source-list, as only capturing a full NTFS volume is sup‐
466             ported.
467
468       --pipable
469             With wimcapture, create a wimlib-specific "pipable" WIM which can
470             be captured and applied fully sequentially.  If WIMFILE is speci‐
471             fied as "-", then the pipable WIM is written directly to standard
472             output;  otherwise, it is written to disk as usual.  The image in
473             the pipable WIM can be later be  applied  with  wimapply,  either
474             from  disk or from standard input.  A typical use of pipable WIMs
475             might involve streaming the WIM image to  a  remote  server  when
476             capturing  it and/or streaming the WIM image from a remote server
477             when applying it.
478
479             Generally, all the wimlib-imagex commands work  on  both  pipable
480             and non-pipable WIMs.  wimoptimize and wimexport may also be used
481             to convert between pipable WIMs and non-pipable  WIMs.   However,
482             there are a few limitations of pipable WIMs:
483
484             •   Pipable  WIMs are a wimlib extension which are not compatible
485                 with Microsoft's WIM software or with other programs such  as
486                 7-Zip.
487
488             •   Using  wimappend,  multiple  images may be added to a pipable
489                 WIM.  This is supported, though it is less efficient than do‐
490                 ing  so  with non-pipable WIMs because a pipable WIM is fully
491                 rebuilt each time it is appended to; and when piping  such  a
492                 WIM  to wimapply to extract an image, some unneeded data will
493                 be sent over the pipe.
494
495             •   Although a pipable WIM image may be updated using  wimupdate,
496                 it  requires  a  full rebuild of the WIM file, making it less
497                 efficient than updating a non-pipable WIM.
498
499             •   Solid pipable WIMs are not yet supported.
500
501       --not-pipable
502             With wimappend, rebuild the WIM file in the non-pipable (regular)
503             format.  This option is only useful if you happen to be adding an
504             image to a pipable WIM (see --pipable) which you want in  non-pi‐
505             pable  format instead.  Note that wimoptimize(1) can also be used
506             to convert between non-pipable and pipable WIMs.
507
508       --update-of=[WIMFILE:]IMAGE
509             Hint that the image being captured or  appended  from  SOURCE  is
510             mostly  the same as the existing image IMAGE in WIMFILE, but cap‐
511             tured at a later point in time, possibly with some  modifications
512             in  the  intervening time.  This is designed to be used in incre‐
513             mental backups of the same filesystem or directory  tree.   IMAGE
514             can  be  a 1-based index or name of an existing image in WIMFILE.
515             It can also be a negative integer to index backwards into the im‐
516             ages (e.g.  -1 means the last existing image in WIMFILE).
517
518             When  this  option  is provided, the capture or append of the new
519             image will be optimized by not reading files that, based on meta‐
520             data  such  as timestamps, appear not to have been modified since
521             they were archived in the existing IMAGE.   Barring  manipulation
522             of  timestamps, this option only affects performance and does not
523             change the resulting WIM image (but see note below).
524
525             As shown, the full syntax for the argument to this option  is  to
526             specify the WIM file, a colon, and the image; for example, "--up‐
527             date-of mywim.wim:1".  However, the WIM file  and  colon  may  be
528             omitted  if --delta-from is specified exactly once, in which case
529             the WIM defaults to that specified in --delta-from, or if the op‐
530             eration is wimappend rather wimcapture, in which case the WIM de‐
531             faults to the one being appended to.
532
533             Note: in the Windows version of wimlib, it has been observed that
534             --update-of  mode is not completely reliable at detecting changes
535             in file contents, sometimes causing the old  contents  of  a  few
536             files to be archived rather than the current contents.  The cause
537             of this problem is that Windows does  not  immediately  update  a
538             file's  last  modification  timestamp  after  every write to that
539             file.  Unfortunately, there is no known way for applications like
540             wimlib to automatically work around this bug.  Manual workarounds
541             are possible; theoretically, taking any action  that  causes  the
542             problematic  files  to be closed, such as restarting applications
543             or the computer itself, should cause the files' last modification
544             timestamps  to  be  updated.  Also note that wimlib compares file
545             sizes as well as timestamps in determining  whether  a  file  has
546             changed,  which  helps make the problem less likely to occur; and
547             the problem does not occur on other  operating  systems  such  as
548             Linux  which  maintain  files'  last modification timestamps cor‐
549             rectly.
550
551       --delta-from=WIMFILE
552             Capture or append the new image as a "delta" from  WIMFILE.   Any
553             file data that would ordinarily need to be archived in the new or
554             updated WIM is omitted if it is already present in the WIMFILE on
555             which  the  delta  is  being based.  The resulting WIM will still
556             contain a full copy of the image metadata, but this is  typically
557             only a small fraction of a WIM's total size.
558
559             This  option  can  be specified multiple times, in which case the
560             resulting delta WIM will only contain file data  not  present  in
561             any of the specified base WIMs.
562
563             To  operate  on the resulting delta WIM using other commands such
564             as wimapply, you must specify the delta WIM as the  WIM  file  to
565             operate  on,  but  also reference the base WIM(s) using the --ref
566             option.  Beware: to retain the proper functioning  of  the  delta
567             WIM,  you  can only add, not delete, files and images to the base
568             WIM(s) following the capture of a delta from it.
569
570             --delta-from may be combined with  --update-of  to  increase  the
571             speed of capturing a delta WIM.
572
573             As  an  example,  consider  the  following backup and restore se‐
574             quence:
575
576
577             (initial backup)
578
579             $ wimcapture /some/directory bkup-base.wim
580
581             (some days later, create second backup as delta from first)
582
583             $ wimcapture /some/directory bkup-2013-08-20.dwm \
584                  --update-of bkup-base.wim:-1 --delta-from bkup-base.wim
585
586             (restoring the second backup)
587
588             $ wimapply bkup-2013-08-20.dwm --ref=bkup-base.wim 1 \
589                  /some/directory
590
591             However, note that as an alternative to the above  sequence  that
592             used  a  delta  WIM, the second backup could have simply been ap‐
593             pended to the WIM as  new  image  using  wimappend.   Delta  WIMs
594             should be used only if it's desired to base the backups or images
595             on a separate, large file that is rarely modified.
596
597             --delta-from is supported by both wimcapture and wimappend.
598
599             Delta WIMs are compatible with Microsoft's WIM software.  For ex‐
600             ample,  you  can  use  the /ref option of ImageX to reference the
601             base WIM(s), similar to above.
602
603             Additional note: wimlib is generalized enough  that  you  can  in
604             fact  combine  --pipable and --delta-from to create pipable delta
605             WIMs.  In such cases, the base WIM(s) must be captured as pipable
606             as  well  as  the delta WIM, and when applying an image, the base
607             WIM(s) must be sent over the pipe after the delta WIM.
608
609       --wimboot
610             Mark the image as WIMBoot-compatible.  See Microsoft's documenta‐
611             tion  for  more  information about WIMBoot.  With wimcapture this
612             option will set the compression type to XPRESS and the chunk size
613             to  4096  bytes;  these can, however, still be overridden through
614             the --compress and --chunk-size parameters, respectively.  In ad‐
615             dition,   this   option   will  set  the  configuration  file  to
616             SOURCE\Windows\System32\WimBootCompress.ini if present and acces‐
617             sible; however, this may still be overridden through the --config
618             parameter.
619
620       --unsafe-compact
621             With wimappend, compact the WIM archive in-place and  append  any
622             new data, eliminating "holes".  This is efficient, but in general
623             this option should not be used because a  failed  or  interrupted
624             compaction  will  corrupt the WIM archive.  For more information,
625             see the documentation for this option to wimoptimize(1).
626
627       --snapshot
628             Create a temporary filesystem snapshot of  the  source  directory
629             and  capture  the  files from it.  Currently, this option is only
630             supported on Windows, where it uses the Volume Shadow  Copy  Ser‐
631             vice  (VSS).   Using  this  option,  you  can create a consistent
632             backup of the system volume of a running Windows  system  without
633             running into problems with locked files.  For the VSS snapshot to
634             be successfully created, wimlib-imagex must be run as an Adminis‐
635             trator,  and  it  cannot be run in WoW64 mode (i.e. if Windows is
636             64-bit, then wimlib-imagex must be 64-bit as well).
637
638       --create
639             With wimappend, if the WIM file doesn't exist yet, then create it
640             (like wimcapture).
641

NOTES

643       wimappend does not support appending an image to a split WIM.
644
645       Except  when  using  --unsafe-compact,  it is safe to abort a wimappend
646       command partway through; however, after doing this, it  is  recommended
647       to run wimoptimize to remove any data that was appended to the physical
648       WIM file but not yet incorporated into the structure of the WIM, unless
649       the  WIM  was  being fully rebuilt (e.g. with --rebuild), in which case
650       you should delete the temporary file left over.
651
652       wimlib-imagex creates WIMs compatible with Microsoft's  software  (WIM‐
653       GAPI, ImageX, DISM), with some caveats:
654
655       •   With wimlib-imagex on UNIX-like systems, it is possible to create a
656           WIM image containing files with names differing only  in  case,  or
657           files with names containing the characters ':', '*', '?', '"', '<',
658           '>', '|', or '\', which are valid  on  POSIX-compliant  filesystems
659           but  not  Windows.  Be warned that such files will not be extracted
660           by default by the  Windows  version  of  wimlib-imagex,  and  (even
661           worse)  Microsoft's  ImageX  can be confused by such names and quit
662           extracting the image partway through.
663
664       •   Pipable WIMs are incompatible with Microsoft's  software.   Pipable
665           WIMs  are  created  only  if WIMFILE was specified as "-" (standard
666           output) or if the --pipable flag was specified.
667
668       •   WIMs captured with a non-default chunk size (with the  --chunk-size
669           option) or as solid archives (with the --solid option) or with LZMS
670           compression  (with  --compress=LZMS  or  --compress=recovery)  have
671           varying  levels of compatibility with Microsoft's software.  Gener‐
672           ally, more recent versions of Microsoft's software are more compat‐
673           ible.
674

EXAMPLES

676       First  example:  Create a new WIM 'mywim.wim' with LZX ("maximum") com‐
677       pression that will contain a  captured  image  of  the  directory  tree
678       'somedir'.  Note that the image name need not be specified and will de‐
679       fault to 'somedir':
680
681              wimcapture somedir mywim.wim
682
683       Next, append the image of a different directory tree to the WIM created
684       above:
685
686              wimappend anotherdir mywim.wim
687
688       Easy  enough, and the above examples of imaging directory trees work on
689       both UNIX-like systems and Windows.  Next, capture a WIM  with  several
690       non-default  options,  including XPRESS ("fast") compression, extra in‐
691       tegrity information, no messing with absolute symbolic  links,  and  an
692       image name and description:
693
694              wimcapture somedir mywim.wim --compress=fast \
695                     --check --norpfix "Some Name" "Some Description"
696
697       On  a UNIX-like system, capture a full NTFS volume into a new WIM using
698       the NTFS VOLUME CAPTURE (UNIX) mode, and name the image "Windows 7":
699
700              wimcapture /dev/sda2 windows7.wim "Windows 7"
701
702       or, on Windows, to capture a full NTFS volume you instead need to spec‐
703       ify the root directory of the mounted volume, for example:
704
705              wimcapture E:\ windows7.wim "Windows 7"
706
707       Same  as UNIX example above, but capture the WIM in the wimlib-specific
708       "pipable" format that can be piped to wimapply:
709
710              wimcapture /dev/sda2 windows7.wim "Windows 7" --pipable
711
712       Same as above, but instead of writing the pipable WIM to the file "win‐
713       dows7.wim",  write  it  directly to standard output through a pipe into
714       some other program "someprog", which could, for example, be  a  program
715       or script that streams the data to a server:
716
717              wimcapture /dev/sda2 - "Windows 7" | someprog
718

SEE ALSO

720       wimlib-imagex(1), wimapply(1) wimoptimize(1)
721
722
723
724wimlib 1.13.5                    December 2021                   WIMCAPTURE(1)
Impressum