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
21       directory, 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
37       extension).
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
42       directory.   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
148           uncompressed  and  stored  subject  to  the  WIM's own compression.
149           There 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
178       example, 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
185       after 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
197             --update-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
231             ratio.   wimlib  supports  different chunk sizes depending on the
232             compression 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
245             resources.   If  you  are creating a solid WIM (using the --solid
246             option), 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
267             resources.   The  default  is LZMS compression.  This option only
268             has 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
272             resources.   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",
296             "DESCRIPTION",  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
327                 include, even when the file or directory also matches a  glob
328                 in  [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
394             option is to first  try  omitting  the  SACL  from  the  security
395             descriptor,   then   to  try  omitting  the  security  descriptor
396             entirely.  The purpose of this is to capture as much data as pos‐
397             sible  without  always  requiring Administrator privileges.  How‐
398             ever, if you desire that all  security  descriptors  be  captured
399             exactly, you may wish to provide this option, although the Admin‐
400             istrator should 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
406             being  captured  will  be adjusted to be absolute relative to the
407             root  of  the  directory  tree  being  captured.   When  disabled
408             (--norpfix),  absolute symbolic links will be captured exactly as
409             is.
410
411             The default behavior of wimcapture is equivalent to --rpfix.  The
412             default behavior of wimappend is equivalent to --rpfix if reparse
413             point fixups have previously  been  done  on  WIMFILE,  otherwise
414             --norpfix.
415
416             In the case of a multi-source capture, (--source-list specified),
417             passing --norpfix is recommended.  Otherwise, reparse point  fix‐
418             ups will be disabled on all capture sources destined for non-root
419             locations in the WIM image, while capture  sources  destined  for
420             the  WIM  root  will  get  the default behavior from the previous
421             paragraph.
422
423       --source-list
424             wimcapture and wimappend support creating a WIM image from multi‐
425             ple  separate files or directories.  When --source-list is speci‐
426             fied, the SOURCE argument specifies the name of a text file, each
427             line  of  which is either 1 or 2 whitespace separated file paths.
428             The first file path, the source, specifies the path to a file  or
429             directory  to capture into the WIM image.  It may be either abso‐
430             lute or relative to the current working  directory.   The  second
431             file  path, if provided, is the target and specifies the path  in
432             the WIM image that this file  or  directory  will  be  saved  as.
433             Leading and trailing slashes in the target are ignored, except if
434             it consists entirely of slashes (e.g. "/"), which indicates  that
435             the  directory  is to become the root of the WIM image.  If omit‐
436             ted, the target string defaults to the same as the source string.
437
438             An example source list file is as follows:
439
440
441                    # Make the WIM image from the 'winpe' directory
442                    winpe     /
443
444                    # Send the 'overlay' directory to '/overlay' in the WIM image
445                    overlay   /overlay
446
447                    # Overlay a separate directory directly on the root of the WIM image.
448                    /data/stuff    /
449
450             Subdirectories in the WIM are created as needed.  Multiple source
451             directories  may share the same target, which implies an overlay.
452             In the event that this results a nondirectory file being added to
453             the  WIM image multiple times, the last version (as listed in the
454             source list file) overrides any earlier version.
455
456             File paths containing whitespace may be quoted with either single
457             quotes or double quotes.  Quotes may not be escaped.
458
459             Lines  consisting only of whitespace and lines beginning with '#'
460             preceded by optional whitespace are ignored.
461
462             As a special case, if SOURCE is "-", the source list is read from
463             standard input rather than an external file.
464
465             The  NTFS volume capture mode on UNIX-like systems cannot be used
466             with --source-list, as only capturing a full NTFS volume is  sup‐
467             ported.
468
469       --pipable
470             With wimcapture, create a wimlib-specific "pipable" WIM which can
471             be captured and applied fully sequentially.  If WIMFILE is speci‐
472             fied as "-", then the pipable WIM is written directly to standard
473             output; otherwise, it is written to disk as usual.  The image  in
474             the  pipable  WIM  can  be later be applied with wimapply, either
475             from disk or from standard input.  A typical use of pipable  WIMs
476             might  involve  streaming  the  WIM image to a remote server when
477             capturing it and/or streaming the WIM image from a remote  server
478             when applying it.
479
480             Generally,  all  the  wimlib-imagex commands work on both pipable
481             and non-pipable WIMs.  wimoptimize and wimexport may also be used
482             to  convert  between pipable WIMs and non-pipable WIMs.  However,
483             there are a few limitations of pipable WIMs:
484
485             ·   Pipable WIMs are a wimlib extension which are not  compatible
486                 with  Microsoft's WIM software or with other programs such as
487                 7-Zip.
488
489             ·   Using wimappend, multiple images may be added  to  a  pipable
490                 WIM.   This  is  supported,  though it is less efficient than
491                 doing so with non-pipable WIMs because a pipable WIM is fully
492                 rebuilt  each  time it is appended to; and when piping such a
493                 WIM to wimapply to extract an image, some unneeded data  will
494                 be sent over the pipe.
495
496             ·   Although  a pipable WIM image may be updated using wimupdate,
497                 it requires a full rebuild of the WIM file,  making  it  less
498                 efficient than updating a non-pipable WIM.
499
500             ·   Solid pipable WIMs are not yet supported.
501
502       --not-pipable
503             With wimappend, rebuild the WIM file in the non-pipable (regular)
504             format.  This option is only useful if you happen to be adding an
505             image  to  a  pipable  WIM (see --pipable) which you want in non-
506             pipable format instead.  Note that  wimoptimize(1)  can  also  be
507             used to convert between non-pipable and pipable WIMs.
508
509       --update-of=[WIMFILE:]IMAGE
510             Hint  that  the  image  being captured or appended from SOURCE is
511             mostly the same as the existing image IMAGE in WIMFILE, but  cap‐
512             tured  at a later point in time, possibly with some modifications
513             in the intervening time.  This is designed to be used  in  incre‐
514             mental  backups  of the same filesystem or directory tree.  IMAGE
515             can be a 1-based index or name of an existing image  in  WIMFILE.
516             It  can  also  be  a negative integer to index backwards into the
517             images (e.g.  -1 means the last existing image in WIMFILE).
518
519             When this option is provided, the capture or append  of  the  new
520             image will be optimized by not reading files that, based on meta‐
521             data such as timestamps, appear not to have been  modified  since
522             they  were  archived in the existing IMAGE.  Barring manipulation
523             of timestamps, this option only affects performance and does  not
524             change the resulting WIM image (but see note below).
525
526             As  shown,  the full syntax for the argument to this option is to
527             specify the WIM file,  a  colon,  and  the  image;  for  example,
528             "--update-of  mywim.wim:1".   However, the WIM file and colon may
529             be omitted if --delta-from is specified exactly  once,  in  which
530             case  the  WIM  defaults to that specified in --delta-from, or if
531             the operation is wimappend rather wimcapture, in which  case  the
532             WIM defaults to the one being appended to.
533
534             Note: in the Windows version of wimlib, it has been observed that
535             --update-of mode is not completely reliable at detecting  changes
536             in  file  contents,  sometimes  causing the old contents of a few
537             files to be archived rather than the current contents.  The cause
538             of  this  problem  is  that Windows does not immediately update a
539             file's last modification timestamp  after  every  write  to  that
540             file.  Unfortunately, there is no known way for applications like
541             wimlib to automatically work around this bug.  Manual workarounds
542             are  possible;  theoretically,  taking any action that causes the
543             problematic files to be closed, such as  restarting  applications
544             or the computer itself, should cause the files' last modification
545             timestamps to be updated.  Also note that  wimlib  compares  file
546             sizes  as  well  as  timestamps in determining whether a file has
547             changed, which helps make the problem less likely to  occur;  and
548             the  problem  does  not  occur on other operating systems such as
549             Linux which maintain files'  last  modification  timestamps  cor‐
550             rectly.
551
552       --delta-from=WIMFILE
553             Capture  or  append the new image as a "delta" from WIMFILE.  Any
554             file data that would ordinarily need to be archived in the new or
555             updated WIM is omitted if it is already present in the WIMFILE on
556             which the delta is being based.  The  resulting  WIM  will  still
557             contain  a full copy of the image metadata, but this is typically
558             only a small fraction of a WIM's total size.
559
560             This option can be specified multiple times, in  which  case  the
561             resulting  delta  WIM  will only contain file data not present in
562             any of the specified base WIMs.
563
564             To operate on the resulting delta WIM using other  commands  such
565             as  wimapply,  you  must specify the delta WIM as the WIM file to
566             operate on, but also reference the base WIM(s)  using  the  --ref
567             option.   Beware:  to  retain the proper functioning of the delta
568             WIM, you can only add, not delete, files and images to  the  base
569             WIM(s) following the capture of a delta from it.
570
571             --delta-from  may  be  combined  with --update-of to increase the
572             speed of capturing a delta WIM.
573
574             As  an  example,  consider  the  following  backup  and   restore
575             sequence:
576
577
578             (initial backup)
579
580             $ wimcapture /some/directory bkup-base.wim
581
582             (some days later, create second backup as delta from first)
583
584             $ wimcapture /some/directory bkup-2013-08-20.dwm \
585                  --update-of bkup-base.wim:-1 --delta-from bkup-base.wim
586
587             (restoring the second backup)
588
589             $ wimapply bkup-2013-08-20.dwm --ref=bkup-base.wim 1 \
590                  /some/directory
591
592             However,  note  that as an alternative to the above sequence that
593             used a delta WIM,  the  second  backup  could  have  simply  been
594             appended  to  the  WIM  as new image using wimappend.  Delta WIMs
595             should be used only if it's desired to base the backups or images
596             on a separate, large file that is rarely modified.
597
598             --delta-from is supported by both wimcapture and wimappend.
599
600             Delta  WIMs  are  compatible  with Microsoft's WIM software.  For
601             example, you can use the /ref option of ImageX to  reference  the
602             base WIM(s), similar to above.
603
604             Additional  note:  wimlib  is  generalized enough that you can in
605             fact combine --pipable and --delta-from to create  pipable  delta
606             WIMs.  In such cases, the base WIM(s) must be captured as pipable
607             as well as the delta WIM, and when applying an  image,  the  base
608             WIM(s) must be sent over the pipe after the delta WIM.
609
610       --wimboot
611             Mark the image as WIMBoot-compatible.  See Microsoft's documenta‐
612             tion for more information about WIMBoot.   With  wimcapture  this
613             option will set the compression type to XPRESS and the chunk size
614             to 4096 bytes; these can, however, still  be  overridden  through
615             the  --compress  and  --chunk-size  parameters, respectively.  In
616             addition,  this  option  will  set  the  configuration  file   to
617             SOURCE\Windows\System32\WimBootCompress.ini if present and acces‐
618             sible; however, this may still be overridden through the --config
619             parameter.
620
621       --unsafe-compact
622             With  wimappend,  compact the WIM archive in-place and append any
623             new data, eliminating "holes".  This is efficient, but in general
624             this  option  should  not be used because a failed or interrupted
625             compaction will corrupt the WIM archive.  For  more  information,
626             see the documentation for this option to wimoptimize(1).
627
628       --snapshot
629             Create  a  temporary  filesystem snapshot of the source directory
630             and capture the files from it.  Currently, this  option  is  only
631             supported  on  Windows, where it uses the Volume Shadow Copy Ser‐
632             vice (VSS).  Using this  option,  you  can  create  a  consistent
633             backup  of  the system volume of a running Windows system without
634             running into problems with locked files.  For the VSS snapshot to
635             be successfully created, wimlib-imagex must be run as an Adminis‐
636             trator, and it cannot be run in WoW64 mode (i.e.  if  Windows  is
637             64-bit, then wimlib-imagex must be 64-bit as well).
638
639       --create
640             With wimappend, if the WIM file doesn't exist yet, then create it
641             (like wimcapture).
642

NOTES

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

EXAMPLES

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

SEE ALSO

721       wimlib-imagex(1), wimapply(1) wimoptimize(1)
722
723
724
725wimlib 1.13.1                      May 2019                      WIMCAPTURE(1)
Impressum