CRIU
Checkpoint/Restore in User-space
CRIU stands for Checkpoint/Restore In Userspace. Using this tool, you can freeze a running container or individual application and checkpoint it as a collection of files on disk. You can then use the files to restore the application and run it exactly as it was during the time of the freeze. With this feature, application live migration, snapshots, remote debugging, and many other things are possible.
CRIU started as a sub-project of OpenVZ and grew with tremendous help from the community. It is currently packaged for many Linux distributions and is integrated into such projects as OpenVZ, Virtuozzo, LXC/LXD, Docker runc, Podman, and other software. It's a part of a container live migration tool called p.haul that automates all the steps needed to live migrate a container with the smallest "freeze time" possible. For that it orchestrates the work of three core CRIU functionalities -- memory pre- and lazy- c/r, general save-restore and disk-less images transfer.
An essential part of the CRIU tool is the library called "Compel" which lets you inject so called parasite code into a running process. This library is the base of CRIU, but is independent from it and allows doing some marvellous tricks like re-directinng IO streams for processes, doing apps live-updates, manipulating the internal state of a running application in a way more powerful manner than gdb allows, etc.