Changes

Jump to navigation Jump to search
56 bytes added ,  22:26, 31 March 2017
fixed sections; rewording
Line 1: Line 1: −
== External Checkpoint Restore ==
+
{{Warning|External C/R was done as a proof-of-concept. Do not use it; please see [[Docker]] for a proper way to do checkpoint/restore with Docker. This article is kept here for historical purposes and some background info.}}
 
  −
{{Note| External C/R was done as proof-of-concept. Its use is discouraged and the helper script mentioned below may break in the near future.}}
      
This approach is called external because it's happening external to the
 
This approach is called external because it's happening external to the
Line 25: Line 23:  
include the Docker daemon which runs in the global PID namespace.
 
include the Docker daemon which runs in the global PID namespace.
   −
=== Command Line Options ===
+
== Command Line Options ==
    
In addition to the usual CRIU command line options used when
 
In addition to the usual CRIU command line options used when
Line 31: Line 29:  
line options are needed for Docker containers.
 
line options are needed for Docker containers.
   −
==== <code>--root</code> ====
+
=== <code>--root</code> ===
    
This option has been used in the past only for restore operations
 
This option has been used in the past only for restore operations
Line 44: Line 42:  
be necessary to specify this option anymore.
 
be necessary to specify this option anymore.
   −
==== <code>--ext-mount-map</code> ====
+
=== <code>--ext-mount-map</code> ===
    
This option is used to specify the path of the external bind mounts.
 
This option is used to specify the path of the external bind mounts.
Line 55: Line 53:  
at <code>/var/lib/docker/containers/''container_id''/hostname</code>.
 
at <code>/var/lib/docker/containers/''container_id''/hostname</code>.
   −
==== <code>--manage-cgroups</code> ====
+
=== <code>--manage-cgroups</code> ===
    
When a process tree exits after a checkpoint operation, the cgroups
 
When a process tree exits after a checkpoint operation, the cgroups
Line 62: Line 60:  
re-creating them if necessary.
 
re-creating them if necessary.
   −
==== <code>--evasive-devices</code> ====
+
=== <code>--evasive-devices</code> ===
    
Docker bind mounts <code>/dev/null</code> on <code>/dev/stdin</code> for detached containers
 
Docker bind mounts <code>/dev/null</code> on <code>/dev/stdin</code> for detached containers
Line 69: Line 67:  
the global <code>/dev/null</code> and the container <code>/dev/null</code> as the same device.
 
the global <code>/dev/null</code> and the container <code>/dev/null</code> as the same device.
   −
==== <code>--inherit-fd</code> ====
+
=== <code>--inherit-fd</code> ===
    
For native C/R support, this option tells CRIU to let the restored process "inherit"
 
For native C/R support, this option tells CRIU to let the restored process "inherit"
 
its specified file descriptor (instead of restoring from checkpoint).
 
its specified file descriptor (instead of restoring from checkpoint).
   −
=== Restore Prework for External C/R ===
+
== Restore Prework for External C/R ==
    
Docker supports many storage drivers (AKA graph drivers) including
 
Docker supports many storage drivers (AKA graph drivers) including
Line 89: Line 87:  
filesystem again before attempting to restore.
 
filesystem again before attempting to restore.
   −
=== An External C/R Example ===
+
== An External C/R Example ==
    
Below is an example to show C/R operations for a shell script that
 
Below is an example to show C/R operations for a shell script that
Line 164: Line 162:  
</pre>
 
</pre>
   −
=== External C/R Helper Script ===
+
== External C/R Helper Script ==
    
As seen in the above examples, the CRIU command line for checkpointing and
 
As seen in the above examples, the CRIU command line for checkpointing and
Line 260: Line 258:  
</pre>
 
</pre>
    +
== See also ==
 +
 +
* [[Docker]]
    
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Navigation menu