]> wimlib.net Git - wimlib/blob - doc/man1/wimexport.1
6cea5faa43bcbfdd7abb7ecbb3a0b1968bbd1d57
[wimlib] / doc / man1 / wimexport.1
1 .TH WIMEXPORT "1" "July 2017" "wimlib 1.12.0" "User Commands"
2 .SH NAME
3 wimexport \- Export image(s) from a WIM archive
4 .SH SYNOPSIS
5 \fBwimexport\fR \fISRC_WIMFILE\fR \fISRC_IMAGE\fR \fIDEST_WIMFILE\fR
6  [\fIDEST_IMAGE_NAME\fR [\fIDEST_IMAGE_DESC\fR]] [\fIOPTION\fR...]
7 .SH DESCRIPTION
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.
13 .PP
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
17 in \fISRC_WIMFILE\fR.
18 .PP
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.
24 .PP
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.
27 .PP
28 \fBwimexport\fR supports exporting images from stand-alone WIMs as well as from
29 split WIMs and delta WIMs.  See \fBSPLIT WIMS\fR.
30 .PP
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.
35 .PP
36 .SH OPTIONS
37 .TP 6
38 \fB--boot\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.
42 .TP
43 \fB--check\fR
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.
48 .TP
49 \fB--nocheck\fR
50 Do not include extra integrity information in the destination WIM, even if it
51 was present before.
52 .TP
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.
56 .TP
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.
62 .TP
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.
66 .TP
67 \fB--recompress\fR
68 Force all exported data to be recompressed, even if the destination WIM will use
69 the same compression type as the source WIM.
70 .TP
71 \fB--solid\fR
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.
76 .TP
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.
80 .TP
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.
84 .TP
85 \fB--threads\fR=\fINUM_THREADS\fR
86 Number of threads to use for compressing data.  Default: autodetect (number of
87 processors).
88 .TP
89 \fB--rebuild\fR
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).
93 .TP
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.
99 .TP
100 \fB--pipable\fR
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.
106 .TP
107 \fB--not-pipable\fR
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
110 non-pipable.
111 .TP
112 \fB--wimboot\fR
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).
116 .TP
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).
123 .SH SPLIT WIMS
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:
130 .PP
131 .RS
132 .nf
133 mywim.swm
134 mywim2.swm
135 mywim3.swm
136 mywim4.swm
137 mywim5.swm
138 .RE
139 .PP
140 To export the first image of this split WIM to a new or existing WIM file
141 "other.wim", run:
142 .PP
143 .RS
144 wimexport mywim.swm 1 other.wim --ref="mywim*.swm"
145 .RE
146 .SH NOTES
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.
153 .PP
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.
159 .PP
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).
168 .SH EXAMPLES
169 Export the second image of 'boot.wim' to the new WIM file 'new.wim':
170 .RS
171 .PP
172 wimexport boot.wim 2 new.wim
173 .RE
174 .PP
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:
178 .RS
179 .PP
180 wimexport boot.wim 2 new.wim --compress=LZX
181 .RE
182 .PP
183 Export "ESD to WIM" --- that is, solid WIM to non-solid WIM:
184 .RS
185 .PP
186 wimexport install.esd all install.wim --compress=LZX
187 .RE
188 .PP
189 Export "WIM to ESD" --- that is, non-solid WIM to solid WIM:
190 .RS
191 .PP
192 wimexport install.wim all install.esd --solid
193 .RE
194 .PP
195 .SH SEE ALSO
196 .BR wimlib-imagex (1)
197 .BR wiminfo (1)
198 .BR wimoptimize (1)