Hallo,
So I had an opportunity to try it out, on the very sad reason....
I was running development in rootless container and was rsyncing
my whole home directory to nas, including podman storage directory
(~/.local/share/containers). At some point my container was lost
and I decided to restore it from the backup. I unmounted
~/.local/share/containers (it's on a separate fs) and bind mounted
this directory from nas instead. podman images command worked without
problems, but podman ps -a gave the following error:
podman ps -a
ERRO[0000] Joining network namespace for container ba61c9037d87a02a9b8781b0abd9b4ce036df3918f25ec107d69f4a40af772d0: error retrieving network namespace at /run/user/1007/netns/netns-38f7b6f9-58b5-2c65-057f-7a9abf783823: failed to Statfs "/run/user/1007/netns/netns-38f7b6f9-58b5-2c65-057f-7a9abf783823": no such file or directory
Error: error joining network namespace of container ba61c9037d87a02a9b8781b0abd9b4ce036df3918f25ec107d69f4a40af772d0: error retrieving network namespace at /run/user/1007/netns/netns-38f7b6f9-58b5-2c65-057f-7a9abf783823: failed to Statfs "/run/user/1007/netns/netns-38f7b6f9-58b5-2c65-057f-7a9abf783823": no such file or directory
So is simple rsync not proper way to backup my containers? Do I still
need some specific procedure for backup?
Btw my original container was lost also under some strange circumstances:
at some point I decided to free up some storage under containers directory.
I had quite a few of leftower stuff from several buildah runs so I just
executed buildah rm --all. After that my running container became unusable,
I could not exec into it and container export or commit commands failed.
When I checked the output of buildah rm command I discovered that last id
in the list of removed containers reported by buildah, was same as the one
of my container! How could that happen? I have a lot of other containers,
which were not affected.
Best regards,
On 29.01.2022 01:08, Daniel Walsh
wrote:
On
1/28/22 15:12, Michael Ivanov wrote:
Greetings,
I make periodic backups of my laptop where I use some podman
containers.
To perform a backup I just invoke rsync to copy my
/home/xxxx/.local/share/containers
directory to nfs mounted filesystem.
Containers are running, but quiescent, no real activity occurs.
Is this a correct way to back up or is there anything special
about
container directory to be taken into account? As far as I
understand
some hash-named subdirectories are shared between different
containers
and images using special kind of mounts, can this lead to
duplicate
copies r inconsistencies?
Underlying fs is btrfs.
Thanks,
I believe this should work fine.
_______________________________________________
Podman mailing list -- podman@lists.podman.io
To unsubscribe send an email to podman-leave@lists.podman.io