01c54c
'\" t
01c54c
.\"     Title: criu
01c54c
.\"    Author: [see the "AUTHOR" section]
01c54c
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
01c54c
.\"      Date: 06/14/2016
01c54c
.\"    Manual: CRIU Manual
01c54c
.\"    Source: criu 2.3
01c54c
.\"  Language: English
01c54c
.\"
01c54c
.TH "CRIU" "8" "06/14/2016" "criu 2\&.3" "CRIU Manual"
01c54c
.\" -----------------------------------------------------------------
01c54c
.\" * Define some portability stuff
01c54c
.\" -----------------------------------------------------------------
01c54c
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
01c54c
.\" http://bugs.debian.org/507673
01c54c
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
01c54c
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
01c54c
.ie \n(.g .ds Aq \(aq
01c54c
.el       .ds Aq '
01c54c
.\" -----------------------------------------------------------------
01c54c
.\" * set default formatting
01c54c
.\" -----------------------------------------------------------------
01c54c
.\" disable hyphenation
01c54c
.nh
01c54c
.\" disable justification (adjust text to left margin only)
01c54c
.ad l
01c54c
.\" -----------------------------------------------------------------
01c54c
.\" * MAIN CONTENT STARTS HERE *
01c54c
.\" -----------------------------------------------------------------
01c54c
.SH "NAME"
01c54c
criu \- checkpoint/restore in userspace
01c54c
.SH "SYNOPSIS"
01c54c
.sp
01c54c
\fBcriu\fR \fI<command>\fR [\fIoptions\fR]
01c54c
.SH "DESCRIPTION"
01c54c
.sp
01c54c
\fBcriu\fR is a tool for checkpointing and restoring running applications\&. It does this by saving their state as a collection of files (see the \fIdump\fR command) and creating equivalent processes from those files (see the \fIrestore\fR command)\&. The restore operation can be performed at a later time, on a different system, or both\&.
01c54c
.SH "OPTIONS"
01c54c
.sp
01c54c
The options are depending on the \fI<command>\fR \fBcriu\fR run with\&.
01c54c
.SS "Common options"
01c54c
.sp
01c54c
Common options are applied to any \fI<command>\fR\&.
01c54c
.PP
01c54c
\fB\-v\fR[\fI<num>\fR|\fBv\fR\&...]
01c54c
.RS 4
01c54c
Set logging level to
01c54c
\fI<num>\fR\&. The higer the level, the more output is produced\&. Either numeric values or multiple
01c54c
\fBv\fR
01c54c
can be used\&.
01c54c
01c54c
The following levels are available:
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fB\-v1\fR,
01c54c
\fB\-v\fR
01c54c
only messages and errors;
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fB\-v2\fR,
01c54c
\fB\-vv\fR
01c54c
also warnings (default level);
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fB\-v3\fR,
01c54c
\fB\-vvv\fR
01c54c
also information messages and timestamps;
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fB\-v4\fR,
01c54c
\fB\-vvvv\fR
01c54c
lots of debug\&.
01c54c
.RE
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-pidfile\fR \fI<file>\fR
01c54c
.RS 4
01c54c
Write root task, service or page\-server pid into a
01c54c
\fI<file>\fR\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-o\fR, \fB\-\-log\-file\fR \fI<file>\fR
01c54c
.RS 4
01c54c
Write logging messages to
01c54c
\fI<file>\fR\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-log\-pid\fR
01c54c
.RS 4
01c54c
Write separate logging files per each pid\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-D\fR, \fB\-\-images\-dir\fR \fI<path>\fR
01c54c
.RS 4
01c54c
Use path
01c54c
\fI<path>\fR
01c54c
as a base directory where to look for dump files set\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-prev\-images\-dir\fR \fI<path>\fR
01c54c
.RS 4
01c54c
Use path
01c54c
\fI<path>\fR
01c54c
as a parent directory where to look for dump files set\&. This make sence in case of increment dumps\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-W\fR, \fB\-\-work\-dir\fR \fI<dir>\fR
01c54c
.RS 4
01c54c
Use directory
01c54c
\fI<dir>\fR
01c54c
for putting logs, pidfiles and statistics\&. If not specified,
01c54c
\fI<path>\fR
01c54c
from
01c54c
\fB\-D\fR
01c54c
option is taken\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-close\fR \fI<fd>\fR
01c54c
.RS 4
01c54c
Close file with descriptor
01c54c
\fI<fd>\fR
01c54c
before any actions\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-L\fR, \fB\-\-libdir\fR \fI<path>\fR
01c54c
.RS 4
01c54c
Path to a plugins directory\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-action\-script\fR \fI<SCRIPT>\fR
01c54c
.RS 4
01c54c
Add an external action script\&. The environment variable
01c54c
\fBCRTOOLS_SCRIPT_ACTION\fR
01c54c
contains one of the actions:
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBpre\-dump\fR
01c54c
run an action prior to beginning a
01c54c
\fBdump\fR
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBpost\-dump\fR
01c54c
run an action upon
01c54c
\fBdump\fR
01c54c
completion;
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBpre\-restore\fR
01c54c
run an action prior to beginning a
01c54c
\fBrestore\fR
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBpost\-restore\fR
01c54c
run an action upon
01c54c
\fBrestore\fR
01c54c
completion;
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBnetwork\-lock\fR
01c54c
lock network in a target network namespace;
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBnetwork\-unlock\fR
01c54c
unlock network in a target network namespace;
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBsetup\-namespaces\fR
01c54c
run an action once root task just been created with required namespaces, note it is early stage on restore nothing were restored yet except namespaces themselves\&.
01c54c
.RE
01c54c
.RE
01c54c
.PP
01c54c
\fB\-V\fR, \fB\-\-version\fR
01c54c
.RS 4
01c54c
Print program version and exit\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-h\fR, \fB\-\-help\fR
01c54c
.RS 4
01c54c
Print a commands list and exit\&. The commands list is very short one just for overview and does not match this manual\&.
01c54c
.RE
01c54c
.SS "pre\-dump"
01c54c
.sp
01c54c
Launches that named pre\-dump procedure, where \fBcriu\fR does snapshot of memory changes since previous pre\-dump\&. Also \fBcriu\fR forms fsnotify cache which speedup \fBrestore\fR procedure\&. \fBpre\-dump\fR requires at least \fB\-t\fR option (see \fBdump\fR below)\&. Optionally \fBpage\-server\fR options may be specified\&.
01c54c
.PP
01c54c
\fB\-\-track\-mem\fR
01c54c
.RS 4
01c54c
Turn on memory changes tracker in the kernel\&. If the option is not passed the memory tracker get turned on implicitly\&.
01c54c
.RE
01c54c
.SS "dump"
01c54c
.sp
01c54c
Starts a checkpoint procedure\&.
01c54c
.PP
01c54c
\fB\-t\fR, \fB\-\-tree\fR \fI<pid>\fR
01c54c
.RS 4
01c54c
Checkpoint the whole process tree starting from
01c54c
\fI<pid>\fR\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-R\fR, \fB\-\-leave\-running\fR
01c54c
.RS 4
01c54c
Leave tasks in running state after checkpoint instead of killing them\&. This option is pretty dangerous and should be used if and only if you understand what you are doing\&.
01c54c
.sp
01c54c
If task is about to run after been checkpointed it can modify TCP connections, delete files and do other dangerous actions\&. So that
01c54c
\fBcriu\fR
01c54c
itself can not guarantee that the next
01c54c
\fBrestore\fR
01c54c
action will not fail\&. Most likely if a user starts
01c54c
\fBcriu\fR
01c54c
with this option passed at least the file system snapshot must be done with help of
01c54c
\fIpost\-dump\fR
01c54c
script\&.
01c54c
.sp
01c54c
In other words, do not use it until really needed\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-s\fR, \fB\-\-leave\-stopped\fR
01c54c
.RS 4
01c54c
Leave tasks in stopped state after checkpoint instead of killing them\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-x\fR, \fB\-\-ext\-unix\-sk\fR [\fI<inode>\fR,<inode>\*(Aq]
01c54c
.RS 4
01c54c
Dump external unix sockets\&. Optionally passing
01c54c
\fI<inode>\fR
01c54c
(or comma separated series) it assigns inodes which allowed for one sided dump\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-freeze\-cgroup\fR
01c54c
.RS 4
01c54c
Use cgroup freezer to collect processes\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-manage\-cgroups\fR
01c54c
.RS 4
01c54c
Collect cgroups into the image thus they gonna be restored then\&. Without this argument
01c54c
\fBcriu\fR
01c54c
will not save cgroups configuration associated with a task\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-tcp\-established\fR
01c54c
.RS 4
01c54c
Checkpoint established TCP connections\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-veth\-pair\fR \fI<IN>\fR\fB=\fR\fI<OUT>\fR
01c54c
.RS 4
01c54c
Correspondence between outside and inside names of veth devices\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-evasive\-devices\fR
01c54c
.RS 4
01c54c
Use any path to a device file if the original one is inaccessible\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-page\-server\fR
01c54c
.RS 4
01c54c
Send pages to a page server (see
01c54c
\fBpage\-server\fR
01c54c
command)\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-force\-irmap\fR
01c54c
.RS 4
01c54c
Force resolving names for inotify and fsnotify watches\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-auto\-dedup\fR
01c54c
.RS 4
01c54c
Deduplicate "old" data in pages images of previous
01c54c
\fBdump\fR\&. Which implies incremental
01c54c
\fBdump\fR
01c54c
mode (see
01c54c
\fBpre\-dump\fR
01c54c
command)\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-l\fR, \fB\-\-file\-locks\fR
01c54c
.RS 4
01c54c
Dump file locks\&. It is necessary to make sure that all file lock users are taken into dump, so it is only safe to use this for enclojured containers where locks are not holed by someone outside of it\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-M\fR, \fB\-\-ext\-mount\-map\fR \fI<KEY>\fR\fB:\fR\fI<VAL>\fR
01c54c
.RS 4
01c54c
Setup mapping for external mounts\&.
01c54c
\fI<KEY>\fR
01c54c
is a mountpoint inside container and corresponding
01c54c
\fI<VAL>\fR
01c54c
is a string that will be written into the image as mountpoint\*(Aqs root value\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-link\-remap\fR
01c54c
.RS 4
01c54c
Allow one to link unlinked files back when possible (modifies FS till
01c54c
\fBrestore\fR)\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-ghost\-limit\fR \fIsize\fR
01c54c
.RS 4
01c54c
Allow one to specify maximum allowed size of deleted file to be carried inside image files\&. By default up to 1M file is allowed\&. It is done in a sake to not carry big files inside images\&.
01c54c
\fIsize\fR
01c54c
may be postfixed with
01c54c
\fIK\fR,
01c54c
\fIM\fR
01c54c
or
01c54c
\fIG\fR
01c54c
(which stands for kilo, mega and gigabytes accordingly)\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-j\fR, \fB\-\-shell\-job\fR
01c54c
.RS 4
01c54c
Allow one to dump shell jobs\&. This implies the restored task will inherit session and process group ID from the criu itself\&. Also this option allows one to migrate a single external tty connection, in other words this option allows one to migrate such application as "top" and friends\&. If passed on
01c54c
\fBdump\fR
01c54c
it must be specified on
01c54c
\fBrestore\fR
01c54c
as well\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-cpu\-cap\fR [,\fI<cap>\fR]
01c54c
.RS 4
01c54c
Specify
01c54c
\fIcap\fR
01c54c
CPU capability to be written into an image file\&. Basically if
01c54c
\fI<cap>\fR
01c54c
is one of
01c54c
\fBall\fR,
01c54c
\fBcpu\fR
01c54c
or
01c54c
\fBins\fR, then
01c54c
\fBcriu\fR
01c54c
writes CPU related information into image file\&. If the option is omitted or set to
01c54c
\fBnone\fR
01c54c
then image will not be written\&. By default
01c54c
\fBcriu\fR
01c54c
do not write this image\&.
01c54c
.RE
01c54c
.SS "restore"
01c54c
.sp
01c54c
Restores previously checkpointed processes\&.
01c54c
.PP
01c54c
\fB\-\-inherit\-fd\fR \fIfd[<num>]:<existing>\fR
01c54c
.RS 4
01c54c
Inherit file descriptors\&. This allows one to treat file descriptor
01c54c
\fI<num>\fR
01c54c
as being already opened via
01c54c
\fI<existing>\fR
01c54c
one and instead of trying to open we inherit it\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-d\fR, \fB\-\-restore\-detached\fR
01c54c
.RS 4
01c54c
Detach
01c54c
\fBcriu\fR
01c54c
itself once restore is complete\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-S\fR, \fB\-\-restore\-sibling\fR
01c54c
.RS 4
01c54c
Restore root task as a sibling (make sense with
01c54c
\fB\-\-restore\-detached\fR) only\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-r\fR, \fB\-\-root\fR \fI<path>\fR
01c54c
.RS 4
01c54c
Change the root filesystem to <path> (when run in mount namespace)\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-manage\-cgroups\fR [<mode>]
01c54c
.RS 4
01c54c
Restore cgroups configuration associated with a task from the image\&. Controllers are always restored in optimistic way \(em if already present in system
01c54c
\fBcriu\fR
01c54c
reuses it, otherwise it will be created\&.
01c54c
.sp
01c54c
The
01c54c
\fI<mode>\fR
01c54c
may be one of below\&.
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBnone\fR\&. Do not restore cgroup properties but require cgroup to pre\-exist at the moment of
01c54c
\fBrestore\fR
01c54c
procedure\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBprops\fR\&. Restore cgroup properties and require cgroup to pre\-exist\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBsoft\fR\&. Restore cgroup properties if only cgroup has been created by
01c54c
\fBcriu\fR, otherwise do not restore properies\&. This is the default if mode is unspecified\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBfull\fR\&. Always restore all cgroups and their properties\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBstrict\fR\&. Restore all cgroups and their properties from the scratch, requiring them to not present in the system\&.
01c54c
.RE
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-cgroup\-root\fR \fI[<controller>:]/<newroot>\fR
01c54c
.RS 4
01c54c
Change the root cgroup the controller will be installed into\&. No controller means that root is the default for all controllers not specified\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-tcp\-established\fR
01c54c
.RS 4
01c54c
Restore previously dumped established TCP connections\&. This implies that the network has been locked between
01c54c
\fBdump\fR
01c54c
and
01c54c
\fBrestore\fR
01c54c
phases so other side of a connection simply notice a kind of lag\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-veth\-pair\fR \fI<IN>\fR\fB=\fR\fI<OUT>\fR
01c54c
.RS 4
01c54c
Correspondence between outside and inside names of veth devices\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-l\fR, \fB\-\-file\-locks\fR
01c54c
.RS 4
01c54c
Restore file locks from the image\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-M\fR, \fB\-\-ext\-mount\-map\fR \fI<KEY>\fR\fB:\fR\fI<VAL>\fR
01c54c
.RS 4
01c54c
Setup mapping for external mounts\&.
01c54c
\fI<KEY>\fR
01c54c
is the value from the image (\fI<VAL>\fR
01c54c
from dump) and the
01c54c
\fI<VAL>\fR
01c54c
is the path on host that will be bind\-mounted into container (to the mountpoint path from image)\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-ext\-mount\-map\fR \fBauto\fR
01c54c
.RS 4
01c54c
This is a special case\&. If this flag is passed, when an external mount is missing from the command line
01c54c
\fI\fB\-\-ext\-mount\-map\fR\fR\fI <KEY>:<VAL>\fR
01c54c
syntax, criu attempts to automatically resolve this mount from its namespace\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-enable\-external\-sharing\fR, \fB\-\-enable\-external\-masters\fR
01c54c
.RS 4
01c54c
These flags enable external shared or slave mounts to be resolved automatically when
01c54c
\fI\fB\-\-ext\-mount\-map auto\fR\fR
01c54c
is passed\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-auto\-dedup\fR
01c54c
.RS 4
01c54c
As soon as a page is restored it get punched out from image\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-j\fR, \fB\-\-shell\-job\fR
01c54c
.RS 4
01c54c
Restore shell jobs, in other words inherit session and process group ID from the criu itself\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-cpu\-cap\fR [\fI<cap>\fR,\fI<cap>\fR]
01c54c
.RS 4
01c54c
Specify
01c54c
\fI<cap>\fR
01c54c
CPU capability to be present on the CPU the process is restoring\&. To inverse capability prefix it with
01c54c
\fB^\fR\&. This option implies that
01c54c
\fB\-\-cpu\-cap\fR
01c54c
has been passed on
01c54c
\fBdump\fR
01c54c
as well, except
01c54c
\fBfpu\fR
01c54c
option case\&.
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBall\fR\&. Require all capabilities\&. This is
01c54c
\fBdefault\fR
01c54c
mode if
01c54c
\fB\-\-cpu\-cap\fR
01c54c
is passed without arguments\&. Most safe mode\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBcpu\fR\&. Require the CPU to have all capabilities in image to match runtime CPU\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBfpu\fR\&. Requre the CPU to have comaptible FPU\&. For example the process might be dumped with xsave capability but attempted to restore without it present on target CPU\&. In such case we refuse to procceed\&. This is
01c54c
\fBdefault\fR
01c54c
mode if
01c54c
\fB\-\-cpu\-cap\fR
01c54c
is not present in command line\&. Note this argument might be passed even if on the
01c54c
\fBdump\fR
01c54c
no
01c54c
\fB\-\-cpu\-cap\fR
01c54c
have been specified becase FPU frames are always encoded into images\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBins\fR\&. Require CPU compatibility on instructions level\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBnone\fR\&. Ignore capabilities\&. Most dangerous mode\&. The behaviour is implementation dependent\&. Try to not use it until really required\&.
01c54c
.sp
01c54c
One possible need of using this option is when
01c54c
\fB\-\-cpu\-cap\fR=\fBcpu\fR
01c54c
has been passed on
01c54c
\fBdump\fR
01c54c
then images are migrated to a less capable processor and one need to
01c54c
\fBrestore\fR
01c54c
this application, by default
01c54c
\fBcriu\fR
01c54c
will refuse to proceed without relaxing capability with
01c54c
\fB\-\-cpu\-cap\fR=\fBnone\fR
01c54c
parameter\&.
01c54c
.RE
01c54c
.RE
01c54c
.SS "check"
01c54c
.sp
01c54c
Checks whether the kernel supports the features that \fBcriu\fR needs to successfully dump and restore a process tree\&.
01c54c
.sp
01c54c
There are three categories of kernel support as described below\&. \fBcriu check\fR always checks Category 1 features unless \fB\-\-feature\fR is specified which only checks the specified feature\&.
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBCategory 1\fR\&. Absolutely required\&. These are features like
01c54c
\fI/proc/<pid>/map_files\fR,
01c54c
\fINETLINK_SOCK_DIAG\fR
01c54c
socket monitoring,
01c54c
\fI/proc/sys/kernel/ns_last_pid\fR, etc\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBCategory 2\fR\&. Required only for specific cases\&. These are features like aio remap,
01c54c
\fI/dev/net/tun\fR, etc\&. that are required if the process being dumped or restored is using them\&.
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
\fBCategory 3\fR\&. Experimental\&. These are features like task\-diag that are used for experimental purposes (mostly during development)\&.
01c54c
.RE
01c54c
.sp
01c54c
If there are no errors or warnings, \fBcriu\fR prints "Looks good\&." and its exit code will be 0\&.
01c54c
.sp
01c54c
A missing Category 1 feature causes \fBcriu\fR to print "Does not look good\&." and its exit code will be non\-zero\&.
01c54c
.sp
01c54c
Missing Category 2 and 3 features cause \fBcriu\fR to print "Looks good but some kernel features are missing which, depending on your process tree, may cause dump or restore failure\&." and its exit code will be non\-zero\&.
01c54c
.sp
01c54c
Without an argument, \fBcriu check\fR checks Category 1 features\&. This behavior can change with the following options:
01c54c
.PP
01c54c
\fB\-\-extra\fR
01c54c
.RS 4
01c54c
Check kernel support for Category 2 features\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-experimental\fR
01c54c
.RS 4
01c54c
Check kernel support for Category 3 features\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-all\fR
01c54c
.RS 4
01c54c
Check kernel support for Category 1, 2, and 3 features\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-feature\fR \fI<name>\fR
01c54c
.RS 4
01c54c
Check a specific feature\&. If
01c54c
\fI<name>\fR
01c54c
is
01c54c
\fIlist\fR, a list of valid kernel feature names that can be checked will be printed\&.
01c54c
.RE
01c54c
.SS "page\-server"
01c54c
.sp
01c54c
Launches \fBcriu\fR in page server mode\&.
01c54c
.PP
01c54c
\fB\-\-daemon\fR
01c54c
.RS 4
01c54c
Runs page server as a daemon (background process)\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-address\fR \fI<address>\fR
01c54c
.RS 4
01c54c
Page server IP address\&.
01c54c
.RE
01c54c
.PP
01c54c
\fB\-\-port\fR \fI<number>\fR
01c54c
.RS 4
01c54c
Page server port number\&.
01c54c
.RE
01c54c
.SS "exec"
01c54c
.sp
01c54c
Executes a system call inside a destination task\*(Aqs context\&.
01c54c
.SS "service"
01c54c
.sp
01c54c
Launches \fBcriu\fR in RPC daemon mode where \fBcriu\fR is listeninп for RPC commands over socket to perform\&. This is convenient for the case where daemon itself is running in a privilege (superuser) mode but clients are not\&.
01c54c
.SS "dedup"
01c54c
.sp
01c54c
Starts pagemap data deduplication procedure, where \fBcriu\fR scans over all pagemap files and tries to minimalize the number of pagemap entries by obtaining the references from a parent pagemap image\&.
01c54c
.SS "cpuinfo dump"
01c54c
.sp
01c54c
Fetches current CPU features and write them into an image file\&.
01c54c
.SS "cpuinfo check"
01c54c
.sp
01c54c
Fetches current CPU features (ie CPU the \fBcriu\fR is running on) and test if they are compatible with ones present in image file\&.
01c54c
.SH "SYSCALLS EXECUTION"
01c54c
.sp
01c54c
To run a system call in another task\*(Aqs context use
01c54c
.sp
01c54c
.if n \{\
01c54c
.RS 4
01c54c
.\}
01c54c
.nf
01c54c
    criu exec \-t pid syscall\-string
01c54c
.fi
01c54c
.if n \{\
01c54c
.RE
01c54c
.\}
01c54c
.sp
01c54c
command\&. The \fIsyscall\-string\fR should look like
01c54c
.sp
01c54c
.if n \{\
01c54c
.RS 4
01c54c
.\}
01c54c
.nf
01c54c
    syscall\-name syscall\-arguments \&.\&.\&.
01c54c
.fi
01c54c
.if n \{\
01c54c
.RE
01c54c
.\}
01c54c
.sp
01c54c
Each command line argument is transformed into the system call argument by the following rules:
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
If one starts with
01c54c
\fB&\fR, the rest of it gets copied to the target task\*(Aqs address space and the respective syscall argument is the pointer to this string;
01c54c
.RE
01c54c
.sp
01c54c
.RS 4
01c54c
.ie n \{\
01c54c
\h'-04'\(bu\h'+03'\c
01c54c
.\}
01c54c
.el \{\
01c54c
.sp -1
01c54c
.IP \(bu 2.3
01c54c
.\}
01c54c
Otherwise it is treated as a number (converted with strtol) and is directly passed into the system call\&.
01c54c
.RE
01c54c
.SH "EXAMPLES"
01c54c
.sp
01c54c
To checkpoint a program with pid of \fB1234\fR and write all image files into directory \fBcheckpoint\fR:
01c54c
.sp
01c54c
.if n \{\
01c54c
.RS 4
01c54c
.\}
01c54c
.nf
01c54c
    criu dump \-D checkpoint \-t 1234
01c54c
.fi
01c54c
.if n \{\
01c54c
.RE
01c54c
.\}
01c54c
.sp
01c54c
To restore this program detaching criu itself:
01c54c
.sp
01c54c
.if n \{\
01c54c
.RS 4
01c54c
.\}
01c54c
.nf
01c54c
    criu restore \-d \-D checkpoint
01c54c
.fi
01c54c
.if n \{\
01c54c
.RE
01c54c
.\}
01c54c
.sp
01c54c
To close a file descriptor number \fB1\fR in task with pid \fB1234\fR:
01c54c
.sp
01c54c
.if n \{\
01c54c
.RS 4
01c54c
.\}
01c54c
.nf
01c54c
    criu exec \-t 1234 close 1
01c54c
.fi
01c54c
.if n \{\
01c54c
.RE
01c54c
.\}
01c54c
.sp
01c54c
To open a file named \fB/foo/bar\fR for read\-write in the task with pid \fB1234\fR:
01c54c
.sp
01c54c
.if n \{\
01c54c
.RS 4
01c54c
.\}
01c54c
.nf
01c54c
    criu exec \-t 1234 open \*(Aq&/foo/bar\*(Aq 2
01c54c
.fi
01c54c
.if n \{\
01c54c
.RE
01c54c
.\}
01c54c
.SH "AUTHOR"
01c54c
.sp
01c54c
OpenVZ team\&.
01c54c
.SH "COPYRIGHT"
01c54c
.sp
01c54c
Copyright (C) 2011\-2015, Parallels Inc\&.