From: Serge Hallyn Date: Thu, 12 Sep 2013 20:07:11 +0000 (-0500) Subject: snapshots: add man page and fix up help info a bit. X-Git-Tag: lxc-1.0.0.alpha2~121 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=813a4837659d5d7a2c0d0abe03c87196747217e9;p=thirdparty%2Flxc.git snapshots: add man page and fix up help info a bit. Signed-off-by: Serge Hallyn Acked-by: Stéphane Graber --- diff --git a/configure.ac b/configure.ac index c734beae3..6c74dcda9 100644 --- a/configure.ac +++ b/configure.ac @@ -414,6 +414,7 @@ AC_CONFIG_FILES([ doc/lxc-netstat.sgml doc/lxc-ps.sgml doc/lxc-restart.sgml + doc/lxc-snapshot.sgml doc/lxc-start-ephemeral.sgml doc/lxc-start.sgml doc/lxc-stop.sgml diff --git a/doc/Makefile.am b/doc/Makefile.am index 2321a68bc..f2a106baa 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -22,6 +22,7 @@ man_MANS = \ lxc-netstat.1 \ lxc-ps.1 \ lxc-restart.1 \ + lxc-snapshot.1 \ lxc-start.1 \ lxc-stop.1 \ lxc-unfreeze.1 \ diff --git a/doc/lxc-snapshot.sgml.in b/doc/lxc-snapshot.sgml.in new file mode 100644 index 000000000..f66070b1a --- /dev/null +++ b/doc/lxc-snapshot.sgml.in @@ -0,0 +1,152 @@ + + + + +]> + + + + @LXC_GENERATE_DATE@ + + + lxc-snapshot + 1 + + + + lxc-snapshot + + + Snapshot an existing container. + + + + + + lxc-snapshot + -n, --name name + -c, --comment file + + + lxc-snapshot + -n, --name name + -L, --list + -C, --showcomments + + + lxc-snapshot + -n, --name name + -r, -restore snapshot-name + newname + + + + + Description + + + lxc-snapshot creates, lists, and restores + container snapshots. + + + Snapshots are stored as snapshotted containers under a private configuration path. For instance, if the container's configuration path is /var/lib/lxc and the container is c1, then the first snapshot will be stored as container snap0 under configuration path /var/lib/lxcsnaps/c1. + + + + + + Options + + + + + + + Associate the comment in comment_file with the newly created snapshot. + + + + + + + List existing snapshots. + + + + + + + Show snapshot comments in the snapshots listings. + + + + + + + Restore the named snapshot, meaning a full new container is created which is a copy of the snapshot. + + + + + + + When restoring a snapshot, the last optional argument is the name to use for the restored container. If no name is given, then the original container will be destroyed and the restored container will take its place. Note that deleting the original snapshot is not possible in the case of overlayfs or zfs backed snapshots. + + + + + + + + &commonoptions; + + &seealso; + + + Author + Serge Hallyn serge.hallyn@ubuntu.com + + + + + diff --git a/src/lxc/lxc_snapshot.c b/src/lxc/lxc_snapshot.c index 05562f0f0..0177f5dd8 100644 --- a/src/lxc/lxc_snapshot.c +++ b/src/lxc/lxc_snapshot.c @@ -129,13 +129,14 @@ static const struct option my_longopts[] = { static struct lxc_arguments my_args = { - .progname = "lxc-create", + .progname = "lxc-snapshot", .help = "\ ---name=NAME [-w] [-r] [-t timeout] [-P lxcpath]\n\ +--name=NAME [-P lxcpath] [-L [-C]] [-c commentfile] [-r snapname [newname]]\n\ \n\ -lxc-create creates a container\n\ +lxc-snapshot snapshots a container\n\ \n\ Options :\n\ + -n, --name=NAME NAME for name of the container\n\ -L, --list list snapshots\n\ -C, --showcomments show snapshot comments in list\n\ -c, --comment=file add file as a comment\n\