cf68a0
'\" t
cf68a0
.\"     Title: criu
cf68a0
.\"    Author: [see the "AUTHOR" section]
465e6b
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
465e6b
.\"      Date: 09/28/2017
cf68a0
.\"    Manual: CRIU Manual
465e6b
.\"    Source: criu 3.5
cf68a0
.\"  Language: English
cf68a0
.\"
465e6b
.TH "CRIU" "8" "09/28/2017" "criu 3\&.5" "CRIU Manual"
cf68a0
.\" -----------------------------------------------------------------
cf68a0
.\" * Define some portability stuff
cf68a0
.\" -----------------------------------------------------------------
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.\" http://bugs.debian.org/507673
cf68a0
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.ie \n(.g .ds Aq \(aq
cf68a0
.el       .ds Aq '
cf68a0
.\" -----------------------------------------------------------------
cf68a0
.\" * (re)Define some macros
cf68a0
.\" -----------------------------------------------------------------
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.\" toupper - uppercase a string (locale-aware)
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.de toupper
cf68a0
.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ
cf68a0
\\$*
cf68a0
.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz
cf68a0
..
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.\" SH-xref - format a cross-reference to an SH section
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.de SH-xref
cf68a0
.ie n \{\
cf68a0
.\}
cf68a0
.toupper \\$*
cf68a0
.el \{\
cf68a0
\\$*
cf68a0
.\}
cf68a0
..
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.\" SH - level-one heading that works better for non-TTY output
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.de1 SH
cf68a0
.\" put an extra blank line of space above the head in non-TTY output
cf68a0
.if t \{\
cf68a0
.sp 1
cf68a0
.\}
cf68a0
.sp \\n[PD]u
cf68a0
.nr an-level 1
cf68a0
.set-an-margin
cf68a0
.nr an-prevailing-indent \\n[IN]
cf68a0
.fi
cf68a0
.in \\n[an-margin]u
cf68a0
.ti 0
cf68a0
.HTML-TAG ".NH \\n[an-level]"
cf68a0
.it 1 an-trap
cf68a0
.nr an-no-space-flag 1
cf68a0
.nr an-break-flag 1
cf68a0
\." make the size of the head bigger
cf68a0
.ps +3
cf68a0
.ft B
cf68a0
.ne (2v + 1u)
cf68a0
.ie n \{\
cf68a0
.\" if n (TTY output), use uppercase
cf68a0
.toupper \\$*
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.nr an-break-flag 0
cf68a0
.\" if not n (not TTY), use normal case (not uppercase)
cf68a0
\\$1
cf68a0
.in \\n[an-margin]u
cf68a0
.ti 0
cf68a0
.\" if not n (not TTY), put a border/line under subheading
cf68a0
.sp -.6
cf68a0
\l'\n(.lu'
cf68a0
.\}
cf68a0
..
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.\" SS - level-two heading that works better for non-TTY output
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.de1 SS
cf68a0
.sp \\n[PD]u
cf68a0
.nr an-level 1
cf68a0
.set-an-margin
cf68a0
.nr an-prevailing-indent \\n[IN]
cf68a0
.fi
cf68a0
.in \\n[IN]u
cf68a0
.ti \\n[SN]u
cf68a0
.it 1 an-trap
cf68a0
.nr an-no-space-flag 1
cf68a0
.nr an-break-flag 1
cf68a0
.ps \\n[PS-SS]u
cf68a0
\." make the size of the head bigger
cf68a0
.ps +2
cf68a0
.ft B
cf68a0
.ne (2v + 1u)
cf68a0
.if \\n[.$] \&\\$*
cf68a0
..
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.\" BB/EB - put background/screen (filled box) around block of text
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.de BB
cf68a0
.if t \{\
cf68a0
.sp -.5
cf68a0
.br
cf68a0
.in +2n
cf68a0
.ll -2n
cf68a0
.gcolor red
cf68a0
.di BX
cf68a0
.\}
cf68a0
..
cf68a0
.de EB
cf68a0
.if t \{\
cf68a0
.if "\\$2"adjust-for-leading-newline" \{\
cf68a0
.sp -1
cf68a0
.\}
cf68a0
.br
cf68a0
.di
cf68a0
.in
cf68a0
.ll
cf68a0
.gcolor
cf68a0
.nr BW \\n(.lu-\\n(.i
cf68a0
.nr BH \\n(dn+.5v
cf68a0
.ne \\n(BHu+.5v
cf68a0
.ie "\\$2"adjust-for-leading-newline" \{\
cf68a0
\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
cf68a0
.\}
cf68a0
.el \{\
cf68a0
\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[]
cf68a0
.\}
cf68a0
.in 0
cf68a0
.sp -.5v
cf68a0
.nf
cf68a0
.BX
cf68a0
.in
cf68a0
.sp .5v
cf68a0
.fi
cf68a0
.\}
cf68a0
..
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.\" BM/EM - put colored marker in margin next to block of text
cf68a0
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cf68a0
.de BM
cf68a0
.if t \{\
cf68a0
.br
cf68a0
.ll -2n
cf68a0
.gcolor red
cf68a0
.di BX
cf68a0
.\}
cf68a0
..
cf68a0
.de EM
cf68a0
.if t \{\
cf68a0
.br
cf68a0
.di
cf68a0
.ll
cf68a0
.gcolor
cf68a0
.nr BH \\n(dn
cf68a0
.ne \\n(BHu
cf68a0
\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[]
cf68a0
.in 0
cf68a0
.nf
cf68a0
.BX
cf68a0
.in
cf68a0
.fi
cf68a0
.\}
cf68a0
..
cf68a0
.\" -----------------------------------------------------------------
cf68a0
.\" * set default formatting
cf68a0
.\" -----------------------------------------------------------------
cf68a0
.\" -----------------------------------------------------------------
cf68a0
.\" * MAIN CONTENT STARTS HERE *
cf68a0
.\" -----------------------------------------------------------------
cf68a0
.SH "Name"
cf68a0
criu \- checkpoint/restore in userspace
cf68a0
.SH "Synopsis"
cf68a0
.sp
cf68a0
\fBcriu\fR \fIcommand\fR [\fIoption\fR \&...]
cf68a0
.SH "DESCRIPTION"
cf68a0
.sp
cf68a0
\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 \fBdump\fR command) and creating equivalent processes from those files (see the \fBrestore\fR command)\&. The restore operation can be performed at a later time, on a different system, or both\&.
cf68a0
.SH "OPTIONS"
465e6b
.sp
465e6b
Most of the true / false long options (the ones without arguments) can be prefixed with \fB\-\-no\-\fR to negate the option (example: \fB\-\-display\-stats\fR and \fB\-\-no\-display\-stats\fR)\&.
cf68a0
.SS "Common options"
cf68a0
.sp
cf68a0
Common options are applicable to any \fIcommand\fR\&.
cf68a0
.PP
465e6b
\fB\-v\fR[\fBv\fR\&...], \fB\-\-verbosity\fR
cf68a0
.RS 4
cf68a0
Increase verbosity up from the default level\&. Multiple
cf68a0
\fBv\fR
465e6b
can be used, each increasing verbosity by one level\&. Using long option without argument increases verbosity by one level\&.
cf68a0
.RE
cf68a0
.PP
465e6b
\fB\-v\fR\fInum\fR, \fB\-\-verbosity\fR=\fInum\fR
cf68a0
.RS 4
cf68a0
Set verbosity level to
cf68a0
\fInum\fR\&. The higher the level, the more output is produced\&.
cf68a0
cf68a0
The following levels are available:
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fB\-v0\fR
cf68a0
no output;
cf68a0
.RE
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fB\-v1\fR
cf68a0
only errors;
cf68a0
.RE
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fB\-v2\fR
cf68a0
above plus warnings (this is the default level);
cf68a0
.RE
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fB\-v3\fR
cf68a0
above plus information messages and timestamps;
cf68a0
.RE
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fB\-v4\fR
cf68a0
above plus lots of debug\&.
cf68a0
.RE
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-pidfile\fR \fIfile\fR
cf68a0
.RS 4
cf68a0
Write root task, service or page\-server pid into a
cf68a0
\fIfile\fR\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-o\fR, \fB\-\-log\-file\fR \fIfile\fR
cf68a0
.RS 4
cf68a0
Write logging messages to
cf68a0
\fIfile\fR\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-log\-pid\fR
cf68a0
.RS 4
cf68a0
Write separate logging files per each pid\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-display\-stats\fR
cf68a0
.RS 4
cf68a0
During dump as well as during restore
cf68a0
\fBcriu\fR
cf68a0
collects information like the time required to dump or restore the process or the number of pages dumped or restored\&. This information is always written to the files
cf68a0
\fIstats\-dump\fR
cf68a0
and
cf68a0
\fIstats\-restore\fR
cf68a0
and can be easily displayed using
cf68a0
\fBcrit\fR\&. The option
cf68a0
\fB\-\-display\-stats\fR
cf68a0
additionally prints out this information on the console at the end of a dump or a restore\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-D\fR, \fB\-\-images\-dir\fR \fIpath\fR
cf68a0
.RS 4
cf68a0
Use
cf68a0
\fIpath\fR
cf68a0
as a base directory where to look for sets of image files\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-prev\-images\-dir\fR \fIpath\fR
cf68a0
.RS 4
cf68a0
Use
cf68a0
\fIpath\fR
cf68a0
as a parent directory where to look for sets of image files\&. This option makes sense in case of incremental dumps\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-W\fR, \fB\-\-work\-dir\fR \fIdir\fR
cf68a0
.RS 4
cf68a0
Use directory
cf68a0
\fIdir\fR
cf68a0
for putting logs, pidfiles and statistics\&. If not specified,
cf68a0
\fIpath\fR
cf68a0
from
cf68a0
\fB\-D\fR
cf68a0
option is taken\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-close\fR \fIfd\fR
cf68a0
.RS 4
cf68a0
Close file descriptor
cf68a0
\fIfd\fR
cf68a0
before performing any actions\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-L\fR, \fB\-\-libdir\fR \fIpath\fR
cf68a0
.RS 4
cf68a0
Path to plugins directory\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-action\-script\fR \fIscript\fR
cf68a0
.RS 4
cf68a0
Add an external action script to be executed at certain stages\&. The environment variable
cf68a0
\fBCRTOOLS_SCRIPT_ACTION\fR
cf68a0
is available to the script to find out which action is being executed, and its value can be one of the following:
cf68a0
.PP
cf68a0
\fBpre\-dump\fR
cf68a0
.RS 4
cf68a0
run prior to beginning a
cf68a0
\fBdump\fR
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBpost\-dump\fR
cf68a0
.RS 4
cf68a0
run upon
cf68a0
\fBdump\fR
cf68a0
completion
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBpre\-restore\fR
cf68a0
.RS 4
cf68a0
run prior to beginning a
cf68a0
\fBrestore\fR
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBpre\-resume\fR
cf68a0
.RS 4
cf68a0
run when all processes and resources are restored but tasks are stopped waiting for final kick to run\&. Must not fail\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBpost\-restore\fR
cf68a0
.RS 4
cf68a0
run upon
cf68a0
\fBrestore\fR
cf68a0
completion
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBnetwork\-lock\fR
cf68a0
.RS 4
cf68a0
run to lock network in a target network namespace
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBnetwork\-unlock\fR
cf68a0
.RS 4
cf68a0
run to unlock network in a target network namespace
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBsetup\-namespaces\fR
cf68a0
.RS 4
cf68a0
run once root task just been created with required namespaces\&. Note it is an early stage of restore, when nothing is restored yet except for namespaces themselves
cf68a0
.RE
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-V\fR, \fB\-\-version\fR
cf68a0
.RS 4
cf68a0
Print program version and exit\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-h\fR, \fB\-\-help\fR
cf68a0
.RS 4
cf68a0
Print some help and exit\&.
cf68a0
.RE
cf68a0
.SS "pre\-dump"
cf68a0
.sp
cf68a0
Performs the pre\-dump procedure, during which \fBcriu\fR creates a snapshot of memory changes since the previous \fBpre\-dump\fR\&. Note that during this \fBcriu\fR also creates the fsnotify cache which speeds up the \fBrestore\fR procedure\&. \fBpre\-dump\fR requires at least \fB\-t\fR option (see \fBdump\fR below)\&. In addition, \fBpage\-server\fR options may be specified\&.
cf68a0
.PP
cf68a0
\fB\-\-track\-mem\fR
cf68a0
.RS 4
cf68a0
Turn on memory changes tracker in the kernel\&. If the option is not passed the memory tracker get turned on implicitly\&.
cf68a0
.RE
cf68a0
.SS "dump"
cf68a0
.sp
cf68a0
Performs a checkpoint procedure\&.
cf68a0
.PP
cf68a0
\fB\-t\fR, \fB\-\-tree\fR \fIpid\fR
cf68a0
.RS 4
cf68a0
Checkpoint the whole process tree starting from
cf68a0
\fIpid\fR\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-R\fR, \fB\-\-leave\-running\fR
cf68a0
.RS 4
cf68a0
Leave tasks in running state after checkpoint, instead of killing\&. This option is pretty dangerous and should be used only if you understand what you are doing\&.
cf68a0
.sp
cf68a0
Note if task is about to run after been checkpointed, it can modify TCP connections, delete files and do other dangerous actions\&. Therefore,
cf68a0
\fBcriu\fR
cf68a0
can not guarantee that the next
cf68a0
\fBrestore\fR
cf68a0
action will succeed\&. Most likely if this option is used, at least the file system snapshot must be made with the help of
cf68a0
\fBpost\-dump\fR
cf68a0
action script\&.
cf68a0
.sp
cf68a0
In other words, do not use it unless really needed\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-s\fR, \fB\-\-leave\-stopped\fR
cf68a0
.RS 4
cf68a0
Leave tasks in stopped state after checkpoint, instead of killing\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external\fR \fItype\fR\fB[\fR\fIid\fR\fB]:\fR\fIvalue\fR
cf68a0
.RS 4
cf68a0
Dump an instance of an external resource\&. The generic syntax is
cf68a0
\fItype\fR
cf68a0
of resource, followed by resource
cf68a0
\fIid\fR
cf68a0
(enclosed in literal square brackets), and optional
cf68a0
\fIvalue\fR
cf68a0
(prepended by a literal semicolon)\&. The following resource types are currently supported:
cf68a0
\fBmnt\fR,
cf68a0
\fBdev\fR,
cf68a0
\fBfile\fR,
cf68a0
\fBtty\fR,
cf68a0
\fBunix\fR\&. Syntax depends on type\&. Note to restore external resources, either
cf68a0
\fB\-\-external\fR
cf68a0
or
cf68a0
\fB\-\-inherit\-fd\fR
cf68a0
is used, depending on resource type\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external mnt[\fR\fImountpoint\fR\fB]:\fR\fIname\fR
cf68a0
.RS 4
cf68a0
Dump an external bind mount referenced by
cf68a0
\fImountpoint\fR, saving it to image under the identifier
cf68a0
\fIname\fR\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external mnt[]:\fR\fIflags\fR
cf68a0
.RS 4
cf68a0
Dump all external bind mounts, autodetecting those\&. Optional
cf68a0
\fIflags\fR
cf68a0
can contain
cf68a0
\fBm\fR
cf68a0
to also dump external master mounts,
cf68a0
\fBs\fR
cf68a0
to also dump external shared mounts (default behavior is to abort dumping if such mounts are found)\&. If
cf68a0
\fIflags\fR
cf68a0
are not provided, semicolon is optional\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external dev[\fR\fImajor\fR\fB/\fR\fIminor\fR\fB]:\fR\fIname\fR
cf68a0
.RS 4
cf68a0
Allow to dump a mount namespace having a real block device mounted\&. A block device is identified by its
cf68a0
\fImajor\fR
cf68a0
and
cf68a0
\fIminor\fR
cf68a0
numbers, and
cf68a0
\fBcriu\fR
cf68a0
saves its information to image under the identifier
cf68a0
\fIname\fR\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external file[\fR\fImnt_id\fR\fB:\fR\fIinode\fR\fB]\fR
cf68a0
.RS 4
cf68a0
Dump an external file, i\&.e\&. an opened file that is can not be resolved from the current mount namespace, which can not be dumped without using this option\&. The file is identified by
cf68a0
\fImnt_id\fR
cf68a0
(a field obtained from
cf68a0
\fB/proc/\fR\fIpid\fR\fB/fdinfo/\fR\fIN\fR) and
cf68a0
\fIinode\fR
cf68a0
(as returned by
cf68a0
\fBstat\fR(2))\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external tty[\fR\fIrdev\fR\fB:\fR\fIdev\fR\fB]\fR
cf68a0
.RS 4
cf68a0
Dump an external TTY, identified by
cf68a0
\fBst_rdev\fR
cf68a0
and
cf68a0
\fBst_dev\fR
cf68a0
fields returned by
cf68a0
\fBstat\fR(2)\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external unix[\fR\fIid\fR\fB]\fR
cf68a0
.RS 4
cf68a0
Tell
cf68a0
\fBcriu\fR
cf68a0
that one end of a pair of UNIX sockets (created by
cf68a0
\fBsocketpair\fR(2)) with
cf68a0
\fIid\fR
cf68a0
is OK to be disconnected\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-freeze\-cgroup\fR
cf68a0
.RS 4
cf68a0
Use cgroup freezer to collect processes\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-manage\-cgroups\fR
cf68a0
.RS 4
cf68a0
Collect cgroups into the image thus they gonna be restored then\&. Without this option,
cf68a0
\fBcriu\fR
cf68a0
will not save cgroups configuration associated with a task\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-cgroup\-props\fR \fIspec\fR
cf68a0
.RS 4
cf68a0
Specify controllers and their properties to be saved into the image file\&.
cf68a0
\fBcriu\fR
cf68a0
predefines specifications for common controllers, but since the kernel can add new controllers and modify their properties, there should be a way to specify ones matched the kernel\&.
cf68a0
.sp
cf68a0
\fIspec\fR
cf68a0
argument describes the controller and properties specification in a simplified YAML form:
cf68a0
.sp
cf68a0
.if n \{\
cf68a0
.RS 4
cf68a0
.\}
cf68a0
.fam C
cf68a0
.ps -1
cf68a0
.nf
cf68a0
.BB lightgray
cf68a0
"c1":
cf68a0
 \- "strategy": "merge"
cf68a0
 \- "properties": ["a", "b"]
cf68a0
"c2":
cf68a0
 \- "strategy": "replace"
cf68a0
 \- "properties": ["c", "d"]
cf68a0
.EB lightgray
cf68a0
.fi
cf68a0
.fam
cf68a0
.ps +1
cf68a0
.if n \{\
cf68a0
.RE
cf68a0
.\}
cf68a0
.sp
cf68a0
where
cf68a0
\fIc1\fR
cf68a0
and
cf68a0
\fIc2\fR
cf68a0
are controllers names, and
cf68a0
\fIa\fR,
cf68a0
\fIb\fR,
cf68a0
\fIc\fR,
cf68a0
\fId\fR
cf68a0
are their properties\&.
cf68a0
.sp
cf68a0
Note the format: double quotes, spaces and new lines are required\&. The
cf68a0
\fIstrategy\fR
cf68a0
specifies what to do if a controller specified already exists as a built\-in one:
cf68a0
\fBcriu\fR
cf68a0
can either
cf68a0
\fBmerge\fR
cf68a0
or
cf68a0
\fBreplace\fR
cf68a0
such\&.
cf68a0
.sp
cf68a0
For example, the command line for the above example should look like this:
cf68a0
.sp
cf68a0
.if n \{\
cf68a0
.RS 4
cf68a0
.\}
cf68a0
.fam C
cf68a0
.ps -1
cf68a0
.nf
cf68a0
.BB lightgray
cf68a0
\-\-cgroup\-props "\e"c1\e":\en \- \e"strategy\e": \e"merge\e"\en \- \e"properties\e": [\e"a\e", \e"b\e"]\en \e"c2\e":\en \- \e"strategy\e": \e"replace\e"\en \- \e"properties\e": [\e"c\e", \e"d\e"]"
cf68a0
.EB lightgray
cf68a0
.fi
cf68a0
.fam
cf68a0
.ps +1
cf68a0
.if n \{\
cf68a0
.RE
cf68a0
.\}
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-cgroup\-props\-file\fR \fIfile\fR
cf68a0
.RS 4
cf68a0
Same as
cf68a0
\fB\-\-cgroup\-props\fR, except the specification is read from the
cf68a0
\fIfile\fR\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-cgroup\-dump\-controller\fR \fIname\fR
cf68a0
.RS 4
cf68a0
Dump a controller with
cf68a0
\fIname\fR
cf68a0
only, skipping anything else that was discovered automatically (usually via
cf68a0
\fB/proc\fR)\&. This option is useful when one needs
cf68a0
\fBcriu\fR
cf68a0
to skip some controllers\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-cgroup\-props\-ignore\-default\fR
cf68a0
.RS 4
cf68a0
When combined with
cf68a0
\fB\-\-cgroup\-props\fR, makes
cf68a0
\fBcriu\fR
cf68a0
substitute a predefined controller property with the new one shipped\&. If the option is not used, the predefined properties are merged with the provided ones\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-tcp\-established\fR
cf68a0
.RS 4
cf68a0
Checkpoint established TCP connections\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-skip\-in\-flight\fR
cf68a0
.RS 4
cf68a0
This option skips in\-flight TCP connections\&. If any TCP connections that are not yet completely established are found,
cf68a0
\fBcriu\fR
cf68a0
ignores these connections, rather than errors out\&. The TCP stack on the client side is expected to handle the re\-connect gracefully\&.
cf68a0
.RE
cf68a0
.PP
465e6b
\fB\-\-tcp\-close\fR
465e6b
.RS 4
465e6b
Restore connected TCP sockets in closed state\&.
465e6b
.RE
465e6b
.PP
cf68a0
\fB\-\-evasive\-devices\fR
cf68a0
.RS 4
cf68a0
Use any path to a device file if the original one is inaccessible\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-page\-server\fR
cf68a0
.RS 4
cf68a0
Send pages to a page server (see the
cf68a0
\fBpage\-server\fR
cf68a0
command)\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-force\-irmap\fR
cf68a0
.RS 4
cf68a0
Force resolving names for inotify and fsnotify watches\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-auto\-dedup\fR
cf68a0
.RS 4
cf68a0
Deduplicate "old" data in pages images of previous
cf68a0
\fBdump\fR\&. This option implies incremental
cf68a0
\fBdump\fR
cf68a0
mode (see the
cf68a0
\fBpre\-dump\fR
cf68a0
command)\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-l\fR, \fB\-\-file\-locks\fR
cf68a0
.RS 4
cf68a0
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 enclosed containers where locks are not held by any processes outside of dumped process tree\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-link\-remap\fR
cf68a0
.RS 4
cf68a0
Allows to link unlinked files back, if possible (modifies filesystem during
cf68a0
\fBrestore\fR)\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-ghost\-limit\fR \fIsize\fR
cf68a0
.RS 4
cf68a0
Set the maximum size of deleted file to be carried inside image\&. By default, up to 1M file is allowed\&. Using this option allows to not put big deleted files inside images\&. Argument
cf68a0
\fIsize\fR
cf68a0
may be postfixed with a
cf68a0
\fBK\fR,
cf68a0
\fBM\fR
cf68a0
or
cf68a0
\fBG\fR, which stands for kilo\-, mega, and gigabytes, accordingly\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-j\fR, \fB\-\-shell\-job\fR
cf68a0
.RS 4
cf68a0
Allow one to dump shell jobs\&. This implies the restored task will inherit session and process group ID from the
cf68a0
\fBcriu\fR
cf68a0
itself\&. This option also allows to migrate a single external tty connection, to migrate applications like
cf68a0
\fBtop\fR\&. If used with
cf68a0
\fBdump\fR
cf68a0
command, it must be specified with
cf68a0
\fBrestore\fR
cf68a0
as well\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-cpu\-cap\fR [\fIcap\fR[,\fIcap\fR\&...]]
cf68a0
.RS 4
cf68a0
Specify CPU capabilities to write to an image file\&. The argument is a comma\-separated list of
cf68a0
\fBnone\fR,
cf68a0
\fBfpu\fR,
cf68a0
\fBcpu\fR,
cf68a0
\fBins\fR,
cf68a0
\fBall\fR\&. If the argument is omitted or set to
cf68a0
\fBnone\fR, capabilities will not be written, which is the default behavior\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-cgroup\-root\fR [\fIcontroller\fR:]/\fInewroot\fR
cf68a0
.RS 4
cf68a0
Change the root for the controller that will be dumped\&. By default,
cf68a0
\fBcriu\fR
cf68a0
simply dumps everything below where any of the tasks live\&. However, if a container moves all of its tasks into a cgroup directory below the container engine\(cqs default directory for tasks, permissions will not be preserved on the upper directories with no tasks in them, which may cause problems\&.
cf68a0
.RE
465e6b
.PP
465e6b
\fB\-\-lazy\-pages\fR
465e6b
.RS 4
465e6b
Perform the dump procedure without writing memory pages into the image files and prepare to service page requests over the network\&. When
465e6b
\fBdump\fR
465e6b
runs in this mode it presumes that
465e6b
\fBlazy\-pages\fR
465e6b
daemon will connect to it and fetch memory pages to lazily inject them into the restored process address space\&. This option is intended for post\-copy (lazy) migration and should be used in conjunction with
465e6b
\fBrestore\fR
465e6b
with appropriate options\&.
465e6b
.RE
cf68a0
.SS "restore"
cf68a0
.sp
cf68a0
Restores previously checkpointed processes\&.
cf68a0
.PP
cf68a0
\fB\-\-inherit\-fd\fR \fBfd[\fR\fIN\fR\fB]:\fR\fIresource\fR
cf68a0
.RS 4
cf68a0
Inherit a file descriptor\&. This option lets
cf68a0
\fBcriu\fR
cf68a0
use an already opened file descriptor
cf68a0
\fIN\fR
cf68a0
for restoring a file identified by
cf68a0
\fIresource\fR\&. This option can be used to restore an external resource dumped with the help of
cf68a0
\fB\-\-external\fR
cf68a0
\fBfile\fR,
cf68a0
\fBtty\fR, and
cf68a0
\fBunix\fR
cf68a0
options\&.
cf68a0
.sp
cf68a0
The
cf68a0
\fIresource\fR
cf68a0
argument can be one of the following:
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fBtty[\fR\fIrdev\fR\fB:\fR\fIdev\fR\fB]\fR
cf68a0
.RE
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fBpipe[\fR\fIinode\fR\fB]\fR
cf68a0
.RE
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fBsocket[\fR\fIinode\fR\fB]\fR
cf68a0
.RE
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fBfile[\fR\fImnt_id\fR\fB:\fR\fIinode\fR\fB]\fR
cf68a0
.RE
cf68a0
.sp
cf68a0
.RS 4
cf68a0
.ie n \{\
cf68a0
\h'-04'\(bu\h'+03'\c
cf68a0
.\}
cf68a0
.el \{\
cf68a0
.sp -1
cf68a0
.IP \(bu 2.3
cf68a0
.\}
cf68a0
\fIpath/to/file\fR
cf68a0
.RE
cf68a0
.sp
cf68a0
Note that square brackets used in this option arguments are literals and usually need to be escaped from shell\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-d\fR, \fB\-\-restore\-detached\fR
cf68a0
.RS 4
cf68a0
Detach
cf68a0
\fBcriu\fR
cf68a0
itself once restore is complete\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-s\fR, \fB\-\-leave\-stopped\fR
cf68a0
.RS 4
cf68a0
Leave tasks in stopped state after restore (rather than resuming their execution)\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-S\fR, \fB\-\-restore\-sibling\fR
cf68a0
.RS 4
cf68a0
Restore root task as a sibling (makes sense only with
cf68a0
\fB\-\-restore\-detached\fR)\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-r\fR, \fB\-\-root\fR \fIpath\fR
cf68a0
.RS 4
cf68a0
Change the root filesystem to
cf68a0
\fIpath\fR
cf68a0
(when run in a mount namespace)\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external\fR \fItype\fR\fB[\fR\fIid\fR\fB]:\fR\fIvalue\fR
cf68a0
.RS 4
cf68a0
Restore an instance of an external resource\&. The generic syntax is
cf68a0
\fItype\fR
cf68a0
of resource, followed by resource
cf68a0
\fIid\fR
cf68a0
(enclosed in literal square brackets), and optional
cf68a0
\fIvalue\fR
cf68a0
(prepended by a literal semicolon)\&. The following resource types are currently supported:
cf68a0
\fBmnt\fR,
cf68a0
\fBdev\fR,
cf68a0
\fBveth\fR,
cf68a0
\fBmacvlan\fR\&. Syntax depends on type\&. Note to restore external resources dealing with opened file descriptors (such as dumped with the help of
cf68a0
\fB\-\-external\fR
cf68a0
\fBfile\fR,
cf68a0
\fBtty\fR, and
cf68a0
\fBunix\fR
cf68a0
options), option
cf68a0
\fB\-\-inherit\-fd\fR
cf68a0
should be used\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external mnt[\fR\fIname\fR\fB]:\fR\fImountpoint\fR
cf68a0
.RS 4
cf68a0
Restore an external bind mount referenced in the image by
cf68a0
\fIname\fR, bind\-mounting it from the host
cf68a0
\fImountpoint\fR
cf68a0
to a proper mount point\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external mnt[]\fR
cf68a0
.RS 4
cf68a0
Restore all external bind mounts (dumped with the help of
cf68a0
\fB\-\-external mnt[]\fR
cf68a0
auto\-detection)\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external dev[\fR\fIname\fR\fB]:\fR\fI/dev/path\fR
cf68a0
.RS 4
cf68a0
Restore an external mount device, identified in the image by
cf68a0
\fIname\fR, using the existing block device
cf68a0
\fI/dev/path\fR\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external veth[\fR\fIinner_dev\fR\fB]:\fR\fIouter_dev\fR\fB@\fR\fIbridge\fR
cf68a0
.RS 4
cf68a0
Set the outer VETH device name (corresponding to
cf68a0
\fIinner_dev\fR
cf68a0
being restored) to
cf68a0
\fIouter_dev\fR\&. If optional
cf68a0
\fB@\fR\fIbridge\fR
cf68a0
is specified,
cf68a0
\fIouter_dev\fR
cf68a0
is added to that bridge\&. If the option is not used,
cf68a0
\fIouter_dev\fR
cf68a0
will be autogenerated by the kernel\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-external macvlan[\fR\fIinner_dev\fR\fB]:\fR\fIouter_dev\fR
cf68a0
.RS 4
cf68a0
When restoring an image that have a MacVLAN device in it, this option must be used to specify to which
cf68a0
\fIouter_dev\fR
cf68a0
(an existing network device in CRIU namespace) the restored
cf68a0
\fIinner_dev\fR
cf68a0
should be bound to\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-manage\-cgroups\fR [\fImode\fR]
cf68a0
.RS 4
cf68a0
Restore cgroups configuration associated with a task from the image\&. Controllers are always restored in an optimistic way \(em if already present in system,
cf68a0
\fBcriu\fR
cf68a0
reuses it, otherwise it will be created\&.
cf68a0
.RE
cf68a0
.sp
cf68a0
The \fImode\fR may be one of the following:
cf68a0
.PP
cf68a0
\fBnone\fR
cf68a0
.RS 4
cf68a0
Do not restore cgroup properties but require cgroup to pre\-exist at the moment of
cf68a0
\fBrestore\fR
cf68a0
procedure\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBprops\fR
cf68a0
.RS 4
cf68a0
Restore cgroup properties and require cgroup to pre\-exist\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBsoft\fR
cf68a0
.RS 4
cf68a0
Restore cgroup properties if only cgroup has been created by
cf68a0
\fBcriu\fR, otherwise do not restore properties\&. This is the default if mode is unspecified\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBfull\fR
cf68a0
.RS 4
cf68a0
Always restore all cgroups and their properties\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBstrict\fR
cf68a0
.RS 4
cf68a0
Restore all cgroups and their properties from the scratch, requiring them to not present in the system\&.
cf68a0
.PP
cf68a0
\fB\-\-cgroup\-root\fR [\fIcontroller\fR\fB:\fR]/\fInewroot\fR
cf68a0
.RS 4
cf68a0
Change the root cgroup the controller will be installed into\&. No controller means that root is the default for all controllers not specified\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-tcp\-established\fR
cf68a0
.RS 4
cf68a0
Restore previously dumped established TCP connections\&. This implies that the network has been locked between
cf68a0
\fBdump\fR
cf68a0
and
cf68a0
\fBrestore\fR
cf68a0
phases so other side of a connection simply notice a kind of lag\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-veth\-pair\fR \fIIN\fR\fB=\fR\fIOUT\fR
cf68a0
.RS 4
cf68a0
Correspondence between outside and inside names of veth devices\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-l\fR, \fB\-\-file\-locks\fR
cf68a0
.RS 4
cf68a0
Restore file locks from the image\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-auto\-dedup\fR
cf68a0
.RS 4
cf68a0
As soon as a page is restored it get punched out from image\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-j\fR, \fB\-\-shell\-job\fR
cf68a0
.RS 4
cf68a0
Restore shell jobs, in other words inherit session and process group ID from the criu itself\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-cpu\-cap\fR [\fIcap\fR[,\fIcap\fR\&...]]
cf68a0
.RS 4
cf68a0
Specify CPU capabilities to be present on the CPU the process is restoring\&. To inverse a capability, prefix it with
cf68a0
\fB^\fR\&. This option implies that
cf68a0
\fB\-\-cpu\-cap\fR
cf68a0
has been passed on
cf68a0
\fBdump\fR
cf68a0
as well, except
cf68a0
\fBfpu\fR
cf68a0
option case\&. The
cf68a0
\fIcap\fR
cf68a0
argument can be the following (or a set of comma\-separated values):
cf68a0
.RE
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBall\fR
cf68a0
.RS 4
cf68a0
Require all capabilities\&. This is
cf68a0
\fBdefault\fR
cf68a0
mode if
cf68a0
\fB\-\-cpu\-cap\fR
cf68a0
is passed without arguments\&. Most safe mode\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBcpu\fR
cf68a0
.RS 4
cf68a0
Require the CPU to have all capabilities in image to match runtime CPU\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBfpu\fR
cf68a0
.RS 4
cf68a0
Require the CPU to have compatible 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 proceed\&. This is
cf68a0
\fBdefault\fR
cf68a0
mode if
cf68a0
\fB\-\-cpu\-cap\fR
cf68a0
is not present in command line\&. Note this argument might be passed even if on the
cf68a0
\fBdump\fR
cf68a0
no
cf68a0
\fB\-\-cpu\-cap\fR
cf68a0
have been specified because FPU frames are always encoded into images\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBins\fR
cf68a0
.RS 4
cf68a0
Require CPU compatibility on instructions level\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBnone\fR
cf68a0
.RS 4
cf68a0
Ignore capabilities\&. Most dangerous mode\&. The behaviour is implementation dependent\&. Try to not use it until really required\&.
cf68a0
.sp
cf68a0
For example, this option can be used in case
cf68a0
\fB\-\-cpu\-cap=cpu\fR
cf68a0
was used during
cf68a0
\fBdump\fR, and images are migrated to a less capable CPU and are to be restored\&. By default,
cf68a0
\fBcriu\fR
cf68a0
shows an error that CPU capabilities are not adequate, but this can be suppressed by using
cf68a0
\fB\-\-cpu\-cap=none\fR\&.
cf68a0
.PP
cf68a0
\fB\-\-weak\-sysctls\fR
cf68a0
.RS 4
cf68a0
Silently skip restoring sysctls that are not available\&. This allows to restore on an older kernel, or a kernel configured without some options\&.
cf68a0
.RE
465e6b
.PP
465e6b
\fB\-\-lazy\-pages\fR
465e6b
.RS 4
465e6b
Restore the processes without filling out the entire memory contents\&. When this option is used,
465e6b
\fBrestore\fR
465e6b
sets up the infrastructure required to fill memory pages either on demand when the process accesses them or in the background without stopping the restored process\&. This option requires running
465e6b
\fBlazy\-pages\fR
465e6b
daemon\&.
465e6b
.RE
cf68a0
.RE
cf68a0
.SS "check"
cf68a0
.sp
cf68a0
Checks whether the kernel supports the features needed by \fBcriu\fR to dump and restore a process tree\&.
cf68a0
.sp
cf68a0
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 a specified feature\&.
cf68a0
.PP
cf68a0
\fBCategory 1\fR
cf68a0
.RS 4
cf68a0
Absolutely required\&. These are features like support for
cf68a0
\fB/proc/PID/map_files\fR,
cf68a0
\fBNETLINK_SOCK_DIAG\fR
cf68a0
socket monitoring,
cf68a0
\fB/proc/sys/kernel/ns_last_pid\fR
cf68a0
etc\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBCategory 2\fR
cf68a0
.RS 4
cf68a0
Required only for specific cases\&. These are features like AIO remap,
cf68a0
\fB/dev/net/tun\fR
cf68a0
and others that are only required if a process being dumped or restored is using those\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fBCategory 3\fR
cf68a0
.RS 4
cf68a0
Experimental\&. These are features like
cf68a0
\fBtask\-diag\fR
cf68a0
that are used for experimental purposes (mostly during development)\&.
cf68a0
.RE
cf68a0
.sp
cf68a0
If there are no errors or warnings, \fBcriu\fR prints "Looks good\&." and its exit code is 0\&.
cf68a0
.sp
cf68a0
A missing Category 1 feature causes \fBcriu\fR to print "Does not look good\&." and its exit code is non\-zero\&.
cf68a0
.sp
cf68a0
Missing Category 2 and 3 features cause \fBcriu\fR to print "Looks good but \&..." and its exit code is be non\-zero\&.
cf68a0
.sp
cf68a0
Without any options, \fBcriu check\fR checks Category 1 features\&. This behavior can be changed by using the following options:
cf68a0
.PP
cf68a0
\fB\-\-extra\fR
cf68a0
.RS 4
cf68a0
Check kernel support for Category 2 features\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-experimental\fR
cf68a0
.RS 4
cf68a0
Check kernel support for Category 3 features\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-all\fR
cf68a0
.RS 4
cf68a0
Check kernel support for Category 1, 2, and 3 features\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-feature\fR \fIname\fR
cf68a0
.RS 4
cf68a0
Check a specific feature\&. If
cf68a0
\fIname\fR
cf68a0
is
cf68a0
\fBlist\fR, a list of valid kernel feature names that can be checked will be printed\&.
cf68a0
.RE
cf68a0
.SS "page\-server"
cf68a0
.sp
cf68a0
Launches \fBcriu\fR in page server mode\&.
cf68a0
.PP
cf68a0
\fB\-\-daemon\fR
cf68a0
.RS 4
cf68a0
Runs page server as a daemon (background process)\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-status_fd\fR
cf68a0
.RS 4
cf68a0
Write \e\e0 to the FD and close it once page\-server is ready to handle requests\&. The status\-fd allows to not daemonize a process and get its exit code at the end\&. It isn\(cqt supposed to use \-\-daemon and \-\-status\-fd together\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-address\fR \fIaddress\fR
cf68a0
.RS 4
cf68a0
Page server IP address\&.
cf68a0
.RE
cf68a0
.PP
cf68a0
\fB\-\-port\fR \fInumber\fR
cf68a0
.RS 4
cf68a0
Page server port number\&.
cf68a0
.RE
465e6b
.PP
465e6b
\fB\-\-lazy\-pages\fR
465e6b
.RS 4
465e6b
Serve local memory dump to a remote
465e6b
\fBlazy\-pages\fR
465e6b
daemon\&. In this mode the
465e6b
\fBpage\-server\fR
465e6b
reads local memory dump and allows the remote
465e6b
\fBlazy\-pages\fR
465e6b
deamon to request memory pages in random order\&.
465e6b
.RE
465e6b
.SS "lazy\-pages"
465e6b
.sp
465e6b
Launches \fBcriu\fR in lazy\-pages daemon mode\&.
465e6b
.sp
465e6b
The \fBlazy\-pages\fR daemon is responsible for managing user\-level demand paging for the restored processes\&. It gets information required to fill the process memory pages from the \fBrestore\fR and from the checkpont directory\&. When a restored process access certain memory page for the first time, the \fBlazy\-pages\fR daemon injects its contents into the process address space\&. The memory pages that are not yet requested by the restored processes are injected in the background\&.
cf68a0
.SS "exec"
cf68a0
.sp
cf68a0
Executes a system call inside a destination task\*(Aqs context\&. This functionality is deprecated; please use \fBCompel\fR instead\&.
cf68a0
.SS "service"
cf68a0
.sp
cf68a0
Launches \fBcriu\fR in RPC daemon mode, where \fBcriu\fR is listening for RPC commands over socket to perform\&. This is convenient for a case where daemon itself is running in a privileged (superuser) mode but clients are not\&.
cf68a0
.SS "dedup"
cf68a0
.sp
cf68a0
Starts pagemap data deduplication procedure, where \fBcriu\fR scans over all pagemap files and tries to minimize the number of pagemap entries by obtaining the references from a parent pagemap image\&.
cf68a0
.SS "cpuinfo dump"
cf68a0
.sp
cf68a0
Fetches current CPU features and write them into an image file\&.
cf68a0
.SS "cpuinfo check"
cf68a0
.sp
cf68a0
Fetches current CPU features (i\&.e\&. CPU the \fBcriu\fR is running on) and test if they are compatible with the ones present in an image file\&.
cf68a0
.SH "EXAMPLES"
cf68a0
.sp
cf68a0
To checkpoint a program with pid of \fB1234\fR and write all image files into directory \fBcheckpoint\fR:
cf68a0
.sp
cf68a0
.if n \{\
cf68a0
.RS 4
cf68a0
.\}
cf68a0
.fam C
cf68a0
.ps -1
cf68a0
.nf
cf68a0
.BB lightgray
cf68a0
    criu dump \-D checkpoint \-t 1234
cf68a0
.EB lightgray
cf68a0
.fi
cf68a0
.fam
cf68a0
.ps +1
cf68a0
.if n \{\
cf68a0
.RE
cf68a0
.\}
cf68a0
.sp
cf68a0
To restore this program detaching criu itself:
cf68a0
.sp
cf68a0
.if n \{\
cf68a0
.RS 4
cf68a0
.\}
cf68a0
.fam C
cf68a0
.ps -1
cf68a0
.nf
cf68a0
.BB lightgray
cf68a0
    criu restore \-d \-D checkpoint
cf68a0
.EB lightgray
cf68a0
.fi
cf68a0
.fam
cf68a0
.ps +1
cf68a0
.if n \{\
cf68a0
.RE
cf68a0
.\}
cf68a0
.SH "AUTHOR"
cf68a0
.sp
cf68a0
The CRIU team\&.
cf68a0
.SH "COPYRIGHT"
cf68a0
.sp
cf68a0
Copyright (C) 2011\-2016, Parallels Holdings, Inc\&.