criu/Documentation/crit.txt
Radostin Stoyanov 47f14e9469 crit: Convert memory page compression offline
CRIT can edit image metadata but cannot convert the matching page
payloads as one consistent image set. Changing either side alone can
leave pagemap, inventory, and payload data incompatible.

Add compress and decompress commands for checkpoint directories. Match
CRIU's block encoding, raw threshold, alignment, image version, parent
compatibility, and validation rules. Keep hugetlb and external-plugin
ranges raw because CRIU cannot premap them generically, and add the
Python LZ4 binding to supported dependencies.

Stage every output before replacing any image. Preserve ownership,
permissions, timestamps, xattrs, ACLs, and security metadata; create
exclusive hard-link backups; synchronize directory changes; and defer
terminating signals until the transaction has a definite result. Roll
back the complete image set after a failure and retain the recoverable
source if rollback or cleanup also fails.

Reject symlinks, non-regular images, unsupported versions, inconsistent
compression metadata, unknown modes, and truncated payloads. Recheck
source identities before replacement so a changed pathname is not
overwritten. Cover page and region images, parent chains, exceptional
mappings, metadata preservation, signals, races, and rollback failures.

Assisted-by: Codex:GPT-5
Assisted-by: Claude:claude-fable-5
Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
2026-07-14 10:17:01 +01:00

96 lines
2.6 KiB
Text

CRIT(1)
=======
include::footer.txt[]
NAME
----
crit - CRiu Image Tool
SYNOPSIS
--------
*crit* 'decode' [-h] [-i IN] [-o OUT] [--pretty]
*crit* 'encode' [-h] [-i IN] [-o OUT]
*crit* 'info' [-h] in
*crit* 'x' [-h] dir {ps,fds,mems}
*crit* 'show' [-h] in
*crit* 'compress' [-h] [--in-place] [--acceleration N] dir
*crit* 'decompress' [-h] [--in-place] dir
DESCRIPTION
-----------
*crit* is a feature-rich replacement for existing *criu* show.
ARGUMENTS
---------
Positional Arguments
~~~~~~~~~~~~~~~~~~~~
*decode*::
convert *criu* image from binary type JSON
*encode*::
convert *criu* image from JSON type to binary
*info*::
show info about image
*x*::
explore image directory
*show*::
convert *criu* image from binary to human-readable JSON
*compress*::
compress memory page images in a checkpoint directory using CRIU's
per-page LZ4 format. The command rewrites *pages-*.img*,
*pagemap-*.img*, and *inventory.img*. Pages that are zero-filled or
do not meet CRIU's compression threshold are stored without an LZ4
payload. By default, the original files are preserved with a *.bak*
suffix; use *--in-place* to skip these backup files. The inventory
is updated to record compression metadata and the compressed-image
version. Existing *.bak* files are never overwritten.
*decompress*::
decompress memory page images in a checkpoint directory back to
uncompressed page payloads. The command removes compression metadata
from the pagemap and inventory images. When the directory has no parent
reference, the command also restores the normal image version. It retains
the compressed-image version for incremental checkpoints because a parent
may still contain compressed payloads. By default, rewritten files are
preserved with a *.bak* suffix; use *--in-place* to skip these backup
files. Existing *.bak* files are never overwritten.
Both transformations preserve the ownership, permissions, ACLs, security
labels, and other extended attributes of rewritten images. All output is
staged and synchronized before it is installed. If a write, rename, *SIGHUP*,
*SIGINT*, or *SIGTERM* interrupts the commit, CRIT restores the complete
original image set instead of leaving a partially transformed set.
Optional Arguments
~~~~~~~~~~~~~~~~~~
*-h*, *--help*::
Print some help and exit
*--in-place*::
Rewrite files without creating *.bak* backup files. This option is
accepted by *compress* and *decompress*.
*--acceleration* 'N'::
Set the LZ4 acceleration level used by *compress*. Higher values
trade compression ratio for speed.
SEE ALSO
--------
criu(8)
AUTHOR
------
The CRIU team