]> git.proxmox.com Git - mirror_lxc.git/blobdiff - doc/lxc-checkpoint.sgml.in
Merge pull request #3505 from brauner/2020-08-05/safe_native_terminal_allocation
[mirror_lxc.git] / doc / lxc-checkpoint.sgml.in
index 9cf0c79b1fcba7b6286be25b26da689899af7a9d..f53e9fcec6ad1ddbde3baccabcde0e29d059a97e 100644 (file)
@@ -1,11 +1,9 @@
 <!--
 
-lxc: linux Container library
-
-(C) Copyright IBM Corp. 2007, 2008
+(C) Copyright Canonical Ltd. 2014
 
 Authors:
-Daniel Lezcano <dlezcano at fr.ibm.com>
+Tycho Andersen <tycho.andersen@canonical.com>
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -19,11 +17,11 @@ Lesser General Public License for more details.
 
 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 -->
 
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC @docdtd@ [
 
 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
@@ -36,148 +34,146 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
   <refmeta>
     <refentrytitle>lxc-checkpoint</refentrytitle>
     <manvolnum>1</manvolnum>
-    <refmiscinfo>IBM</refmiscinfo>
   </refmeta>
 
   <refnamediv>
     <refname>lxc-checkpoint</refname>
 
     <refpurpose>
-      checkpoint a running container (not implemented yet)
+      checkpoint a container
     </refpurpose>
   </refnamediv>
 
   <refsynopsisdiv>
     <cmdsynopsis>
       <command>lxc-checkpoint</command>
-      <arg choice="req">--statefile=<replaceable>FILE</replaceable></arg>
-      <arg choice="req">--statefd=<replaceable>FD</replaceable></arg>
-      <arg choice="req">--name=<replaceable>NAME</replaceable></arg>
-      <arg><option>-k</option>|<option>-p</option></arg>
+      <arg choice="req">-n <replaceable>name</replaceable></arg>
+      <arg choice="req">-D <replaceable>PATH</replaceable></arg>
+      <arg choice="opt">-r</arg>
+      <arg choice="opt">-s</arg>
+      <arg choice="opt">-v</arg>
+      <arg choice="opt">-d</arg>
+      <arg choice="opt">-F</arg>
     </cmdsynopsis>
   </refsynopsisdiv>
 
   <refsect1>
     <title>Description</title>
-
     <para>
-      <command>lxc-checkpoint</command> is a command
-      to checkpoint the specified container
-      <replaceable>NAME</replaceable> and dumps its state into the file
-      <replaceable>FILE</replaceable>. If the
-      option <option>--kill</option> is specified, the application
-      running in the container will terminate after the checkpoint
-      just before resuming its execution. If the
-      option <option>--pause</option> is specified, the application
-      will be stopped after the checkpoint just before resuming
-      execution. The command <command>lxc-unfreeze</command> will
-      resume its execution.
+      <command>lxc-checkpoint</command> checkpoints and restores containers.
     </para>
-
   </refsect1>
 
   <refsect1>
-    <title>Checkpoint Options</title>
-
+    <title>Options</title>
     <variablelist>
 
       <varlistentry>
-       <term><option>-S, --statefile=<replaceable>FILE</replaceable></option></term>
-       <listitem>
-         <para>
-           write the state of the container in this
-           <replaceable>FILE</replaceable>.
-           This option is exclusive with <option>--statefd</option> below.
-         </para>
-       </listitem>
+        <term>
+          <option>-r, --restore</option>
+        </term>
+        <listitem>
+          <para>
+            Restore the checkpoint for the container, instead of dumping it.
+            This option is incompatible with <option>-s</option>.
+          </para>
+        </listitem>
       </varlistentry>
 
       <varlistentry>
-       <term><option>-d, --statefd=<replaceable>FD</replaceable></option></term>
-       <listitem>
-         <para>
-           write the state of the container in this
-           <replaceable>FD</replaceable> file descriptor.
-           This option is exclusive with above <option>--statefile</option>.
-         </para>
-       </listitem>
+        <term>
+          <option>-D <replaceable>PATH</replaceable>, --checkpoint-dir=<replaceable>PATH</replaceable></option>
+        </term>
+        <listitem>
+          <para>
+            The directory to dump the checkpoint metadata.
+          </para>
+        </listitem>
       </varlistentry>
 
       <varlistentry>
-       <term><option>-k,--kill</option></term>
-       <listitem>
-         <para>
-           Kill container processes after checkpoint. the processes are sent
-           a <literal>SIGKILL</literal> signal.
-         </para>
-         <para>
-           This option is mutually exclusive with the following
-           <option>--pause</option> option.
-         </para>
-       </listitem>
+        <term>
+          <option>-s, --stop</option>
+        </term>
+        <listitem>
+          <para>
+            Optionally stop the container after dumping. This option is
+            incompatible with <option>-r</option>.
+          </para>
+        </listitem>
       </varlistentry>
 
       <varlistentry>
-       <term><option>-p,--pause</option></term>
-       <listitem>
-         <para>
-           Pause container processes after checkpoint. The container
-           will be stopped until you resume it. This option is
-           mutually exclusive with previously mentionned
-           <option>--kill</option> option.
-         </para>
-       </listitem>
+        <term>
+          <option>-v, --verbose</option>
+        </term>
+        <listitem>
+          <para>
+            Enable verbose criu logging.
+          </para>
+        </listitem>
       </varlistentry>
 
-    </variablelist>
+      <varlistentry>
+        <term>
+          <option>-d, --daemon</option>
+        </term>
+        <listitem>
+          <para>
+            Restore the container in the background (this is the default).
+            Only available when providing <option>-r</option>.
+          </para>
+        </listitem>
+      </varlistentry>
 
+      <varlistentry>
+        <term>
+          <option>-F, --foreground</option>
+        </term>
+        <listitem>
+          <para>
+            Restore the container in the foreground. Only available when
+            providing <option>-r</option>.
+          </para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
   </refsect1>
 
   &commonoptions;
 
   <refsect1>
     <title>Examples</title>
-    <para>
-      To start a new container <literal>123</literal> computing decimals of pi
-    </para>
-    <programlisting>
-      lxc-execute -n 123 -- pi1 -d 500000
-      lxc-execute --name=123 -- pi1 -d 500000
-    </programlisting>
-
-    <para>
-      to checkpoint the same container in <emphasis>dump-death</emphasis>
-      mode
-    </para>
-    <programlisting>
-      lxc-checkpoint -n 123 -S /share/123/chkpt1 -k
-      lxc-checkpoint --name=123 -S /share/123/chkpt1 -k
-    </programlisting>
+    <variablelist>
 
-    <para>
-      to checkpoint the same container and <emphasis>pause</emphasis> it
-    </para>
-    <programlisting>
-      lxc-checkpoint -n 123 -S /share/123/chkpt1 -p
-      lxc-checkpoint --name=123 -S /share/123/chkpt1 -p
-    </programlisting>
+      <varlistentry>
+        <term>lxc-checkpoint -n foo -D /tmp/checkpoint</term>
+        <listitem>
+          <para>
+            Checkpoint the container foo into the directory /tmp/checkpoint.
+          </para>
+        </listitem>
+      </varlistentry>
 
-  </refsect1>
+      <varlistentry>
+        <term>lxc-checkpoint -r -n foo -D /tmp/checkpoint</term>
+        <listitem>
+          <para>
+            Restore the checkpoint from the directory /tmp/checkpoint.
+          </para>
+        </listitem>
+      </varlistentry>
 
-  <refsect1>
-    <title>Notes</title>
-    <para>Actually, this command does not operate. Its description
-    helps to define a CLI api for future Checkpoint / Restart
-    solution</para>
+    </variablelist>
   </refsect1>
 
   &seealso;
 
   <refsect1>
     <title>Author</title>
-    <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
+    <para>Tycho Andersen <email>tycho.andersen@canonical.com</email></para>
   </refsect1>
-
 </refentry>
 
 <!-- Keep this comment at the end of the file