WIMEXPORT(1) | User Commands | WIMEXPORT(1) |
wimexport - Export image(s) from a WIM archive
wimexport SRC_WIMFILE SRC_IMAGE
DEST_WIMFILE
[DEST_IMAGE_NAME [DEST_IMAGE_DESC]] [OPTION...]
wimexport, or equivalently wimlib-imagex export, exports the specified image from SRC_WIMFILE into DEST_WIMFILE, optionally changing the image's name and/or description. If DEST_WIMFILE already exists, the image will be appended to it; otherwise, a new WIM archive will be created to contain the exported image.
SRC_IMAGE specifies the image in SRC_WIMFILE to export. It may be the 1-based index of an image, the name of an image, or the keyword "all" to specify all images. You can use wiminfo(1) to list the images contained in SRC_WIMFILE.
If specified, DEST_IMAGE_NAME is the name to give the image being exported. The default is its name in SRC_WIMFILE. If specified, DEST_IMAGE_NAME must be either a name not already used in DEST_WIMFILE, or the empty string to leave the image unnamed. DEST_IMAGE_NAME cannot be specified if "all" images are being exported.
If specified, DEST_IMAGE_DESC is the description to give the image being exported. The default is its description in SRC_WIMFILE.
wimexport supports exporting images from stand-alone WIMs as well as from split WIMs and delta WIMs. See SPLIT WIMS.
wimexport also supports exporting images from a non-pipable WIM into a pipable WIM or vice versa, or from a non-solid WIM into a solid WIM or vice versa. It can also export a pipable WIM directly to standard output if DEST_WIMFILE is specified as "-"; see --pipable.
You may use wimexport to export images from (but not to) a split WIM. The SRC_WIMFILE argument must specify the first part of the split WIM, while the additional parts of the split WIM must be specified in one or more --ref="GLOB" options. Since globbing is built into the --ref option, typically only one --ref option is necessary. For example, the names for the split WIM parts usually go something like:
mywim.swm mywim2.swm mywim3.swm mywim4.swm mywim5.swm
To export the first image of this split WIM to a new or existing WIM file "other.wim", run:
wimexport mywim.swm 1 other.wim --ref="mywim*.swm"
Data consistency: Except when using --unsafe-compact, it is safe to abort a wimexport command partway through. However, after doing this, it is recommended to run wimoptimize on the destination WIM to remove any data that was appended to the physical WIM file but not yet incorporated into the structure of the WIM, unless the WIM was being rebuilt (e.g. with --rebuild), in which case you should delete the temporary file left over.
Data deduplication: The WIM format has built-in deduplication (also called "single instancing") of file contents. Therefore, when an image is exported, only the file contents not already present in the destination WIM will be physically copied. However, a new copy of the image's metadata resource, which describes the image's directory structure, will always be created.
ESD files: wimexport supports solid-compressed WIMs, or "ESD" (.esd) files, except for encrypted ESDs, which must be decrypted first. The source and destination files of wimexport can be solid WIMs, non-solid WIMs, or a combination thereof. If the destination file does not exist, then by default it will be created as solid if the source was solid, or as non-solid if the source was non-solid. To override this, either specify --solid to create a solid WIM (.esd file), or specify --compress=LZX to create a standard non-solid WIM (.wim file).
Export the second image of 'boot.wim' to the new WIM file 'new.wim':
wimexport boot.wim 2 new.wim
The above example creates "new.wim" with the same compression type as "boot.wim". If you wish to change the compression type, specify --compress=TYPE; for example:
wimexport boot.wim 2 new.wim --compress=LZX
Export "ESD to WIM" --- that is, solid WIM to non-solid WIM:
wimexport install.esd all install.wim --compress=LZX
Export "WIM to ESD" --- that is, non-solid WIM to solid WIM:
wimexport install.wim all install.esd --solid
November 2018 | wimlib 1.13.0 |