Hey, Alvin.

Sorry to read about that. But anyways I'm glad that you've lost only your personal work, not a production one.

> One in particular had a month of work in it (I was using it as a development environment), and it turns out only part of it was backed up. I’m desperate!

It was painful but good experience to remember that the main idea of containers consists in stateless approach. In general, there is no guarantees that your container and its data will be available for a long time, but there is a guarantee that it can be quickly started up again, scaled to a number of instances. 

So, if you work under container environment, you have to store your data outside, whether it's a database, or a file storage.

С уважением, А. И.

пн, 4 сент. 2023 г., 13:27 Alvin Thompson <alvin@thompsonlogic.com>:
Help!

Is there any way to recover files from a deleted container? Long story short, I found the behavior of `podman network rm -f` unexpected, and it wound up deleting most of my containers. One in particular had a month of work in it (I was using it as a development environment), and it turns out only part of it was backed up. I’m desperate!

This is Podman for Windows, so most of the files on the “host” are in the WSL environment. I can get into that no problem with `wsl -d podman-machine-default`.

As an added wrinkle, my default connection was `podman-machine-default-root`, but I was was not running Podman rootful. I’m not sure this is particularly relevant.

grep-ing for strings which are unique to the development environment shows one hit in Windows, in %HOME%/.local/containers/podman/machine/wsl/wsldist/podman-machine-default/ext4.vhdx - which I assume is the file system for the WSL layer itself. I made a copy of it.

A grep within WSL itself doesn’t show so any hits, so it’s possible the files were deleted as far as WSL is concerned. I tried searching for an EXT4 undelete tool, but the only one I found (extundelete) is from 10+ years ago and doesn’t appear to work anymore.

I haven’t stopped WSL (I’m using /tmp as a staging area) or restarted the computer.

I’m at wit’s end. I really don’t know where to begin or look to recover these files, which I really, really need. Any recovery suggestions (no matter how tedious) would be welcome.

I know it’s too late to change now, but man, the behavior of `podman network remove` is unexpected.

Thanks,
Alvin
_______________________________________________
Podman mailing list -- podman@lists.podman.io
To unsubscribe send an email to podman-leave@lists.podman.io