So I mistakenly fell into the classic beginner's trap and reused the wrong and worst command in my .bash_history, namely rm -rf somefolder/*. I'm aware of things I could have done previously, which doesn't help me for the problem at hand.
In Windows, I would just use Recuva, Recover My Files or something similar. I'm sure, that similar File Carving software exists to restore the non-overwritten blocks in Linux and for ZFS.
I found the lsof command, foremost and testdisk which didn't get me further for some reasons.
- The file is not opened any more
foremost -q -i /dev/nvme0n1p11 -o /some/recovery/dir/just reads the input despite the-ioption. It displays this and gets stuck: (the first line is not a problem as it uses/home/linuxbrew/.linuxbrew/etc/foremost.conf.defaultthen.)
foremost: /home/linuxbrew/.linuxbrew/etc/foremost.conf: No such file or directory
Processing: stdin
|
- Testdisk gives me
Support for this filesystem wasn't enabled during compilation.. I already searched for that error, but didn't find anything useful. Is it just not able to process a ZFS partition or how coulud you compile testdisk to be able to?
Please note that this is NOT a duplicate to
- all the "how to get xy from a ZFS snapshot" [1] [2] (also very frequent on other sites [a] ). The required data are unfortunately not included in a backup/snapshot.
- all the "how do you restore deleted xy on [non-Z] File System" such as [1] [2] [3]
I would be glad if we could keep discussion on what to do before it happens to a minimum.
I'm running Linux Lite 6.0, which essentially is a flavor of Ubuntu 22.04 LTS and zfs version gives me:
zfs-2.1.4-0ubuntu0.1
zfs-kmod-2.1.4-0ubuntu0.1
I can also add the output of
sudo fdisk -l /dev/nvme0n1 or what
testdisk ->[ Create ] - >Disk /dev/nvme0n1 - 512 GB / 476 GiB ->[EFI GPT] ->[ Analyse ] gives me if needed.