0

On a hard drive I have two subvolumes: A and B. I wanted to delete A but actually typed:

btrfs sub del B

I immediately unmounted the partition. Can I undo deleting a subvolume and put the drive into a state where I have again A and B?

Edit: I tried to btrfs restore with no luck:

btrfs restore -D -sv --path-regex "^(|/B(|/subdir(|/.*)))$" /dev/sdb1 /mnt/stuff

The above line is not able to produce any files that were in B. It works flawless for A but not B.

Running it without the regex part does not help:

btrfs restore -D -sv /dev/sdb1 /mnt/backup/ > out

And then inspect (grep) it for files that were in B does not result in any success. Seams like btrfs restore in not checking for deleted subvolumes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.