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