]> wimlib.net Git - wimlib/blob - doc/imagex-export.1.in
Doc updates and fix daemon polling
[wimlib] / doc / imagex-export.1.in
1 .TH IMAGEX "1" "November 2012" "imagex (wimlib) wimlib @VERSION@" "User Commands"
2 .SH NAME
3 imagex-export \- Exports an image from a WIM archive to an existing or new WIM archive
4
5 .SH SYNOPSIS
6 \fBimagex export\fR \fISRC_WIMFILE\fR (\fISRC_IMAGE_NUM\fR | \
7 \fISRC_IMAGE_NAME\fR | all ) \fIDEST_WIMFILE\fR [\fIDEST_IMAGE_NAME\fR\] \
8 [\fIDEST_IMAGE_DESCRIPTION\fR] [\fIOPTION\fR]...
9
10 .SH DESCRIPTION
11 .PP
12
13 Copies the specified image in \fISRC_WIMFILE\fR to \fIDEST_WIMFILE\fR,
14 optionally changing its name and/or description and/or compression type.
15 If \fIDEST_WIMFILE\fR exists, it is taken be be a WIM archive to which the image
16 will be appended.  Otherwise, it is created as a new WIM archive containing only
17 the exported image.
18
19 The source image may be specified by \fISRC_IMAGE_NUM\fR, which must be an integer that is
20 an index of an image in \fISRC_WIMFILE\fR, starting at 1.  Alternatively, it may be
21 the name of an image in \fISRC_WIMFILE\fR, or it may be the keyword "all" to
22 specify that all images are to be exported.
23
24 If given, \fIDEST_IMAGE_NAME\fR specifies the name to give the image being
25 exported to \fIDEST_WIMFILE\fR.  The default is its name in \fISRC_WIMFILE\fR.
26 \fIDEST_IMAGE_NAME\fR cannot be specified if multiple images are being exported.
27
28 If given, \fIDEST_IMAGE_DESCRIPTION\fR specifies the description to give the
29 image being exported to \fIDEST_WIMFILE\fR.  The default is its description in
30 \fISRC_WIMFILE\fR.
31
32 \fBimagex export\fR supports exporting images from stand-alone WIMs as well as
33 from split WIMs.  However, you cannot export an image to a split WIM.  See
34 \fBSPLIT WIMS\fR.
35
36 .SH OPTIONS
37 .TP 6
38 \fB--boot\fR
39 Specifies that the exported image is to be the bootable image of the destination
40 WIM archive.
41
42 If multiple images are being exported, this flag indicates that the image in the
43 \fISRC_WIMFILE\fR that is currently marked as bootable is to be made bootable in
44 \fIDEST_WIMFILE\fR.  If no image in \fISRC_WIMFILE\fR is bootable, it is an
45 error.
46 .TP
47 \fB--check\fR
48 When reading \fISRC_WIMFILE\fR, verify its integrity if the integrity table is
49 present; additionally, when writing \fIDEST_WIMFILE\fR with the new image added,
50 write an integrity table.  If this option is not specified, no integrity table
51 is included in \fIDEST_WIMFILE\fR, even if there was one before.
52 .TP
53 \fB--compress\fR=\fITYPE\fR
54 Specifies the compression type for \fIDEST_WIMFILE\fR.  This is only valid if
55 \fIDEST_WIMFILE\fR does not yet exist, since if \fIDEST_WIMFILE\fR exists, the
56 compression type must be the same as that of \fIDEST_WIMFILE\fR.
57
58 \fITYPE\fR may be "none", "maximum", or "fast".  By default, it is the same as
59 that of the input WIM file.
60
61 You may also specify the actual names of the compression algorithms, "XPRESS"
62 and "LZX", instead of "fast" and "maximum", respectively.
63 .TP
64 \fB--threads\fR=\fINUM_THREADS\fR
65 Number of threads to use for compressing data.  Default: autodetect (number of
66 processors).  Note: if exporting to an uncompressed WIM, or exporting to a WIM
67 with the same compression type as the source WIM, additional threads will not
68 be used, regardless of this parameter, since no data compression needs to be
69 done in these cases.
70 .TP
71 \fB--rebuild\fR
72 When exporting image(s) to an existing WIM: rebuild the entire WIM rather than
73 appending data to the end of it.  Rebuilding the WIM is slower, but will save a
74 little bit of space that would otherwise be left as a hole in the WIM.  Also see
75 \fBimagex optimize\fR.
76 .TP
77 \fB--ref\fR="\fIGLOB\fR"
78 File glob of additional split WIM parts that are part of the split WIM being
79 exported.  See \fBSPLIT_WIMS\fR.
80
81 .SH SPLIT WIMS
82
83 You may use \fBimagex export\fR to export images from a split WIM.  The
84 \fISRC_WIMFILE\fR argument is used to specify the first part of the split WIM, and
85 the \fB--refs\fR="\fIGLOB\fR" option is used to provide a shell-style file glob
86 that specifies the additional parts of the split WIM.  \fIGLOB\fR is expected to
87 be a single string on the command line, so \fIGLOB\fR must be quoted so that it
88 is protected against shell expansion.  \fIGLOB\fR must expand to all parts of
89 the split WIM, except optionally the first part which may either omitted or
90 included in the glob (but the first part MUST be specified as \fISRC_WIMFILE\fR as
91 well).
92
93 Here's an example.  The names for the split WIMs usually go something like:
94         
95 .RS
96 .PP
97 .nf
98 mywim.swm
99 mywim2.swm
100 mywim3.swm
101 mywim4.swm
102 mywim5.swm
103 .RE
104
105 To export the first image of this split WIM to a new or existing WIM file
106 "other.wim", run:
107 .PP
108 .RS
109 imagex export mywim.swm 1 other.wim --ref="mywim*.swm"
110 .RE
111 .PP
112
113 .SH NOTES
114
115 Unless --rebuild is specified, aborting an \fBimagex export\fR command mid-way
116 through has a small chance of corrupting the destination WIM file.  However, a
117 precaution is taken against this, so it should be very unlikely.  In the event
118 of an aborted \fBimagex export\fR, \fBimagex optimize\fR can be run to remove
119 extra data that may have been partially appended to the physical destination WIM
120 file but not yet incorporated into the structure of the WIM.
121
122 .SH EXAMPLES
123 Export the second image of 'boot.wim' to the new WIM file 'new.wim', and
124 change the compression type to maximum, if it wasn't maximum already:
125 .RS
126 .PP
127 image export boot.wim 2 new.wim --compress=maximum
128 .RE
129 .PP
130
131 .SH SEE ALSO
132 .BR imagex (1)
133