According to the NixOS 23.05 release notes, podman
users must run podman system reset --force
before upgrading, deleting all “local containers, images, volumes”. However, I (and I am sure others) have state on podman volumes that needs to be preserved (configuration, sqlite databases, etc.). Is there a recommended migration route for users in my position?
2 Likes
Possible (untested) solution: export every volume with podman export volume
. Reset podman, upgrade to 23.05, import volumes with podman import volume
.
2 Likes
You should be able to:
- Stop all podman containers
-
podman volume export <volume> | <volume>.tar
for each volume - podman system reset
-
nixos-rebuild switch --upgrade
. Expect some failures because the containers may not start correctly. -
podman volume create <volume> && podman volume import <volume> <volume>.tar
for each volume - Restart podman services.
I put my /var/lib/containers/storage/volumes
directory in a zfs dataset, so was able to stop services, snapshot the dataset, reset podman, nix upgrade, zfs rollback that dataset and continue on.