diff --git a/man/machinectl.xml b/man/machinectl.xml
index 7aeff686a06..be72d232ea6 100644
--- a/man/machinectl.xml
+++ b/man/machinectl.xml
@@ -214,6 +214,18 @@
URL.
+
+
+
+ When used with the
+ or commands specifies the
+ compression format to use for the resulting file. Takes one of
+ uncompressed, xz,
+ gzip, bzip2. By default
+ the format is determined automatically from the image file
+ name passed.
+
+
@@ -700,20 +712,46 @@
cancel-transfer.
+
+ export-tarNAME [FILE]
+ export-rawNAME [FILE]
+ Exports a TAR or RAW container or VM image and
+ stores it in the specified file. The first parameter should be
+ a VM or container image name. The second parameter should be a
+ file path the TAR or RAW image is written to. If the path ends
+ in .gz the file is compressed with gzip, if
+ it ends in .xz with xz, and if it ends in
+ .bz2 with bzip2. If the path ends in
+ neither the file is left uncompressed. If the second argument
+ is missing the image is written to standard output. The
+ compression may also be explicitly selected with the
+ switch. This is in particular
+ useful if the second parameter is left unspecified.
+
+ Much like image downloads and imports, ongoing exports
+ may be listed with list-transfers and
+ aborted with
+ cancel-transfer.
+
+ Note that currently only directory and subvolume images
+ may be exported as TAR images, and only raw disk images as RAW
+ images.
+
+
list-transfersShows a list of container or VM image
- downloads and imports that are currently in
+ downloads, imports and exports that are currently in
progress.cancel-transfersID...
- Aborts a download or import of the container
- or VM image with the specified ID. To list ongoing transfers
- and their IDs, use
+ Aborts a download, import or export of the
+ container or VM image with the specified ID. To list ongoing
+ transfers and their IDs, use
list-transfers.
@@ -817,6 +855,17 @@
index server to be specified with the
--dkr-index-url=.
+
+
+ Exports a container image as tar file
+
+ # machinectl export-tar fedora myfedora.tar.xz
+
+ Exports the container fedora in an
+ xz-compress tar file myfedora.tar.xz in the
+ current directory.
+
+
@@ -833,7 +882,11 @@
systemd-machined.service8,
systemd-nspawn1,
- systemd.special7
+ systemd.special7,
+ tar1,
+ xz1,
+ gzip1,
+ bzip21
diff --git a/src/machine/machinectl.c b/src/machine/machinectl.c
index 386192b225c..aaf9e9cf2c2 100644
--- a/src/machine/machinectl.c
+++ b/src/machine/machinectl.c
@@ -2320,8 +2320,8 @@ static int help(int argc, char *argv[], void *userdata) {
" pull-dkr REMOTE [NAME] Download a DKR container image\n"
" import-tar FILE [NAME] Import a local TAR container image\n"
" import-raw FILE [NAME] Import a local RAW container or VM image\n"
- " export-tar FILE [NAME] Export a TAR container image locally\n"
- " export-raw FILE [NAME] Export a RAW container or VM image locally\n"
+ " export-tar NAME [FILE] Export a TAR container image locally\n"
+ " export-raw NAME [FILE] Export a RAW container or VM image locally\n"
" list-transfers Show list of downloads in progress\n"
" cancel-transfer Cancel a download\n"
, program_invocation_short_name);