Adrian Bastholm posted on Sat, 29 Dec 2018 23:22:46 +0100 as excerpted: > Hello all, > Is it possible to undelete files on BTRFS ? I just deleted a bunch of > folders and would like to restore them if possible. > > I found this script > https://gist.github.com/Changaco/45f8d171027ea2655d74 but it's not > finding stuff ..
That's an undelete-automation wrapper around btrfs restore... > ./btrfs-undelete /dev/sde1 ./foto /home/storage/BTRFS_RESTORE/ Searching > roots... > Trying root 389562368... (1/70) > ... > Trying root 37339136... (69/70) > Trying root 30408704... (70/70) > Didn't find './foto' That script is the closest thing to a direct undelete command that btrfs has. However, there's still some chance... ** IMPORTANT ** If you still have the filesystem mounted read-write, remount it read-only **IMMEDIATELY**, because every write reduces your chance at recovering any of the deleted files. (More in another reply, but I want to get this sent with the above ASAP.) -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman