Andrei Borzenkov posted on Thu, 12 May 2016 17:19:11 +0300 as excerpted: > I accidentally deleted wrong snapshot using SUSE snapper. Is it possible > to undelete subvolume? I know that it is possible to extract files from > old tree (although SLES12 does not seem to offer btrfs-find-root), but > is it possible to "reconnect" subvolume back? I don't know of a way to do it directly, altho the devs may be able to suggest something exotic, but... You should at least be able to /emulate/ it, by using btrfs restore (with the filesystem unmounted) to write the files elsewhere (the part you suggested), then mounting the filesystem, creating a new subvolume, and copying the restored files back into it. That does lose the reflinks of a snapshot if that's what you deleted, so will take more space, but if you then run one of the btrfs dedupers on it, you should be able to re-reflink it, sharing extents via reflink and reducing the exclusive space used, once again. (Tho I have no personal experience with the dedupers so can't give you specific help in that regard.) But if you were using it as the reference parent for send/receive, or something, I think it's gone from that regard, as the emulation above would of course have a different subvolume ID. -- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
