From 6e9efa59209d48fc69a456fbadb2b5c113f503a6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 10 Mar 2015 15:47:45 +0100 Subject: [PATCH] man: document "machinectl export-tar" and "export-raw" --- man/machinectl.xml | 63 ++++++++++++++++++++++++++++++++++++---- src/machine/machinectl.c | 4 +-- 2 files changed, 60 insertions(+), 7 deletions(-) diff --git a/man/machinectl.xml b/man/machinectl.xml index 7aeff686a..be72d232e 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-tar NAME [FILE] + export-raw NAME [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-transfers Shows a list of container or VM image - downloads and imports that are currently in + downloads, imports and exports that are currently in progress. cancel-transfers ID... - 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 386192b22..aaf9e9cf2 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); -- 2.30.2