From 5bafafc7eb31152b12627a1bf07657013ee01027 Mon Sep 17 00:00:00 2001 From: Adrian Reber Date: Wed, 19 Sep 2018 17:11:17 +0000 Subject: tutorial: add checkpoint/restore to tutorial Signed-off-by: Adrian Reber --- docs/tutorials/podman_tutorial.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'docs/tutorials/podman_tutorial.md') diff --git a/docs/tutorials/podman_tutorial.md b/docs/tutorials/podman_tutorial.md index a866b8eed..152d65a59 100644 --- a/docs/tutorials/podman_tutorial.md +++ b/docs/tutorials/podman_tutorial.md @@ -157,6 +157,28 @@ $ sudo podman top 101 31889 31873 0 09:21 ? 00:00:00 nginx: worker process ``` +### Checkpointing the container +Checkpointing a container stops the container while writing the state of all processes in the container to disk. +With this a container can later be restored and continue running at exactly the same point in time as the +checkpoint. This capability requires CRIU 3.11 or later installed on the system. +To checkpoint the container use: +```console +$ sudo podman container checkpoint +``` + +### Restoring the container +Restoring a container is only possible for a previously checkpointed container. The restored container will +continue to run at exactly the same point in time it was checkpointed. +To restore the container use: +```console +$ sudo podman container restore +``` + +After being restored, the container will answer requests again as it did before checkpointing. +```console +# curl http://:8080 +``` + ### Stopping the container To stop the httpd container: ```console -- cgit v1.2.3-54-g00ecf