Podman Checkpoint/Restore in Userspace
Recently I was migrating our entire Podman infra to a new, bigger server, roughly ~180 container. Most of our things are running in pods
which are fairly easy to migrate, just podman generate kube --filename xyz.yml xyz-pod
, clean up the yml a bit and on the new server I just play it with podman play xyz.yml
. Done, pod migrated.
On the other hand we have a few containers that are running outside of pods and was interested how lazy I can get with those using Podman. Fairly quickly ran into Podman Checkpoints/Restore in Userspace (CRIU)
.
With CRIU Podman is able to checkpoint and restore containers in their current state. Migration is just one use-case, another would be to restore a container after a host reboot exactly the way it was prior the restart. This is exactly what I needed, scripts back in the box, in the new and shiny stuff comes.