Checkpoint and Restore a System Container

Use the Podman page in the Cockpit web console to set a checkpoint on a system container and save its state to disk. After creating a checkpoint and rebooting the system, you can then as needed, restore the state of the system container to an earlier checkpoint in time.

What Do You Need?

  • The Cockpit web console must be installed and accessible.

    For details, see these topics: Install and Enable Cockpit and Log in to the Cockpit Web Console.

  • The Podman container tools must be installed on the host system. For information on how to install Podman, see Installing Podman and Related Utilities in Oracle Linux: Podman User's Guide.
  • The Cockpit-Podman add-on application must be installed. For further information on how to configure the Cockpit web console to interact with Podman, see Install and Configure Cockpit-Podman.
  • One or more running containers must already exist in the Container table. For information on how to create a container or a pod group, see Create and Run Container.
  • Users must have administrator or root privileges to checkpoint and restore a system container.

Steps

Using the Cockpit web console, follow these steps to create and restore a checkpoint on a system container.

  1. In the Cockpit navigation pane, click Podman.

    The Podman page appears.

  2. In the Podman page, navigate to the Container table.
  3. In the Container table, find the row with the running system container of interest and then in that same row select Checkpoint from the actions [] menu.

    The Checkpoint dialog appears.

  4. In the Checkpoint dialog, select any of the following properties that apply and then click Checkpoint.
    Keep all temporary checkpoint files. (Optional) When selected, this option keeps all CRIU created logs and statistical data.
    Leave running after writing checkpoint to disk. (Optional) When selected, this option leaves the container running after the checkpoint process completes.
    Support preserving established TCP connections. (Optional) When selected, this option preserves the current container TCP property connections.
    The checkpoint state for the running container is saved to disk.

    Note:

    The system container can be restored to the saved checkpoint state after a reboot.
  5. To restore the checkpoint container, perform the following steps:
    1. If the system didn't reboot after creating the checkpoint, do the following:
      1. Manually reboot the system.
      2. Access the Cockpit web console and open the Podman page.
    2. In the Podman page of the Cockpit web console, navigate to the row with the checkpoint container and select Restore from the actions [] menu.

      The Restore dialog appears.

    3. In the Restore dialog, specify any of the following properties that apply and then click Restore.
      Keep all temporary checkpoint files. (Optional) When selected, this option saves all CRIU temporary logs and properties created during checkpoint process.

      Note:

      In the case that the checkpoint operation fails, the temporary files, and their properties remain available for debugging purposes.
      Support preserving established TCP connections. (Optional) When selected, this option reserves the current container TCP property connections.
      Ignore IP address if set statically. (Optional) This option applies only when port mappings were configured.

      When selected, this option tries to use the same IP address that was used earlier to start the container.

      Ignore MAC address if set statically. (Optional) When selected, this option tries to use the same MAC address that was used earlier to run the container.

      After the system container is restored to the checkpoint state, it appears in the Container table as a running container.