1 .TH WIMEXPORT "1" "December 2021" "wimlib 1.13.5" "User Commands"
3 wimexport \- Export image(s) from a WIM archive
5 \fBwimexport\fR \fISRC_WIMFILE\fR \fISRC_IMAGE\fR \fIDEST_WIMFILE\fR
6 [\fIDEST_IMAGE_NAME\fR [\fIDEST_IMAGE_DESC\fR]] [\fIOPTION\fR...]
8 \fBwimexport\fR, or equivalently \fBwimlib-imagex export\fR, exports the
9 specified image from \fISRC_WIMFILE\fR into \fIDEST_WIMFILE\fR, optionally
10 changing the image's name and/or description. If \fIDEST_WIMFILE\fR already
11 exists, the image will be appended to it; otherwise, a new WIM archive will be
12 created to contain the exported image.
14 \fISRC_IMAGE\fR specifies the image in \fISRC_WIMFILE\fR to export. It may be
15 the 1-based index of an image, the name of an image, or the keyword "all" to
16 specify all images. You can use \fBwiminfo\fR(1) to list the images contained
19 If specified, \fIDEST_IMAGE_NAME\fR is the name to give the image being
20 exported. The default is its name in \fISRC_WIMFILE\fR. If specified,
21 \fIDEST_IMAGE_NAME\fR must be either a name not already used in
22 \fIDEST_WIMFILE\fR, or the empty string to leave the image unnamed.
23 \fIDEST_IMAGE_NAME\fR cannot be specified if "all" images are being exported.
25 If specified, \fIDEST_IMAGE_DESC\fR is the description to give the image being
26 exported. The default is its description in \fISRC_WIMFILE\fR.
28 \fBwimexport\fR supports exporting images from stand-alone WIMs as well as from
29 split WIMs and delta WIMs. See \fBSPLIT WIMS\fR.
31 \fBwimexport\fR also supports exporting images from a non-pipable WIM into a
32 pipable WIM or vice versa, or from a non-solid WIM into a solid WIM or vice
33 versa. It can also export a pipable WIM directly to standard output if
34 \fIDEST_WIMFILE\fR is specified as "-"; see \fB--pipable\fR.
39 Mark the exported image as the "bootable" image of the WIM; or, if multiple
40 images are being exported, make the image that was the bootable image of the
41 source WIM also the bootable image of the destination WIM.
44 Before exporting the image(s), verify the integrity of the source WIM,
45 destination WIM, and any referenced WIMs whenever they have extra integrity
46 information present. Also include extra integrity information in the
47 destination WIM, even if it was not present before.
50 Do not include extra integrity information in the destination WIM, even if it
53 \fB--include-integrity\fR
54 Include extra integrity information in the destination WIM, i.e. like
55 \fB--check\fR but don't do any verification beforehand.
57 \fB--compress\fR=\fITYPE\fR[:\fILEVEL\fR]
58 Specify the compression type, and optionally the compression level for that
59 compression type, for \fIDEST_WIMFILE\fR. Note that if \fIDEST_WIMFILE\fR
60 already exists, then its compression type cannot be changed by this option. See
61 the documentation for this option to \fBwimcapture\fR(1) for more details.
63 \fB--chunk-size\fR=\fISIZE\fR
64 Set the WIM compression chunk size to \fISIZE\fR. See the documentation for
65 this option to \fBwimcapture\fR(1) for more details.
68 Force all exported data to be recompressed, even if the destination WIM will use
69 the same compression type as the source WIM.
72 Create a "solid" archive that compresses multiple files together. This usually
73 results in a significantly better compression ratio but has disadvantages such
74 as reduced compatibility. See the documentation for this option to
75 \fBwimcapture\fR(1) for more details.
77 \fB--solid-compress\fR=\fITYPE\fR[:\fILEVEL\fR]
78 Like \fB--compress\fR, but set the compression type used in solid resources.
79 See the documentation for this option to \fBwimcapture\fR(1) for more details.
81 \fB--solid-chunk-size\fR=\fISIZE\fR
82 Like \fB--chunk-size\fR, but set the chunk size used in solid resources. See
83 the documentation for this option to \fBwimcapture\fR(1) for more details.
85 \fB--threads\fR=\fINUM_THREADS\fR
86 Number of threads to use for compressing data. Default: autodetect (number of
90 If exporting to an existing WIM, rebuild it rather than appending to it.
91 Rebuilding is slower but will save some space that would otherwise be left as a
92 hole in the WIM. Also see \fBwimoptimize\fR(1).
94 \fB--ref\fR="\fIGLOB\fR"
95 File glob of additional WIMs or split WIM parts to reference resources from.
96 See \fBSPLIT_WIMS\fR. This option can be specified multiple times. Note:
97 \fIGLOB\fR is listed in quotes because it is interpreted by \fBwimexport\fR and
98 may need to be quoted to protect against shell expansion.
101 Build or rebuild \fIDEST_WIMFILE\fR as a "pipable WIM" that can be applied fully
102 sequentially, including from a pipe. See \fBwimcapture\fR(1) for more details
103 about creating pipable WIMs. The default without this option is to make
104 \fIDEST_WIMFILE\fR pipable only if it was "-" (standard output) or was an
105 existing pipable WIM.
108 Rebuild \fIDEST_WIMFILE\fR as a normal, non-pipable WIM. This only useful if
109 you are exporting image(s) to a pipable WIM but you want it rebuilt as
113 Mark the destination image as WIMBoot-compatible. Also, if exporting to a new
114 archive, set the compression type to that recommended for WIMBoot (currently,
115 XPRESS with 4096 byte chunks).
117 \fB--unsafe-compact\fR
118 Compact the existing destination WIM in-place and append any new data,
119 eliminating "holes". This is efficient, but in general this option should
120 \fInot\fR be used because a failed or interrupted compaction will corrupt the
121 WIM archive. For more information, see the documentation for this option to
122 \fBwimoptimize\fR(1).
124 You may use \fBwimexport\fR to export images from (but not to) a split WIM. The
125 \fISRC_WIMFILE\fR argument must specify the first part of the split WIM, while
126 the additional parts of the split WIM must be specified in one or more
127 \fB--ref\fR="\fIGLOB\fR" options. Since globbing is built into the \fB--ref\fR
128 option, typically only one \fB--ref\fR option is necessary. For example, the
129 names for the split WIM parts usually go something like:
140 To export the first image of this split WIM to a new or existing WIM file
144 wimexport mywim.swm 1 other.wim --ref="mywim*.swm"
147 \fIData consistency\fR: Except when using \fB--unsafe-compact\fR, it is safe to
148 abort a \fBwimexport\fR command partway through. However, after doing this, it
149 is recommended to run \fBwimoptimize\fR on the destination WIM to remove any
150 data that was appended to the physical WIM file but not yet incorporated into
151 the structure of the WIM, unless the WIM was being rebuilt (e.g. with
152 \fB--rebuild\fR), in which case you should delete the temporary file left over.
154 \fIData deduplication\fR: The WIM format has built-in deduplication (also called
155 "single instancing") of file contents. Therefore, when an image is exported,
156 only the file contents not already present in the destination WIM will be
157 physically copied. However, a new copy of the image's metadata resource, which
158 describes the image's directory structure, will always be created.
160 \fIESD files\fR: \fBwimexport\fR supports solid-compressed WIMs, or "ESD" (.esd)
161 files, except for encrypted ESDs, which must be decrypted first. The source and
162 destination files of \fBwimexport\fR can be solid WIMs, non-solid WIMs, or a
163 combination thereof. If the destination file does not exist, then by default it
164 will be created as solid if the source was solid, or as non-solid if the source
165 was non-solid. To override this, either specify \fB--solid\fR to create a solid
166 WIM (.esd file), or specify \fB--compress\fR=\fILZX\fR to create a standard
167 non-solid WIM (.wim file).
169 Export the second image of 'boot.wim' to the new WIM file 'new.wim':
172 wimexport boot.wim 2 new.wim
175 The above example creates "new.wim" with the same compression type as
176 "boot.wim". If you wish to change the compression type, specify
177 \fB--compress\fR=\fITYPE\fR; for example:
180 wimexport boot.wim 2 new.wim --compress=LZX
183 Export "ESD to WIM" --- that is, solid WIM to non-solid WIM:
186 wimexport install.esd all install.wim --compress=LZX
189 Export "WIM to ESD" --- that is, non-solid WIM to solid WIM:
192 wimexport install.wim all install.esd --solid
196 .BR wimlib-imagex (1)