Re: How to roll back btrfs filesystem a few revisions?

Josef Bacik
2020-02-22T00:36:43Z

On 2/21/20 7:08 PM, Marc MERLIN wrote:
> On Fri, Feb 21, 2020 at 06:47:26PM -0500, Josef Bacik wrote:
>> Yeah you can try the backup roots, btrfs check -b and see if that works out?
>
> So, I'm not super clear on how to do this.
> the backup roots are not really a way to go back in time, they're just
> the same data that maybe didn't get written, so you can maybe go to the
> last revision if all the roots are not up to date, correct?
>

No they're the previous transaction id's, so it's like going back in time, just
in 30 second jumps.

> If so, is it best to get the last root since it's the one most likely to
> be the oldest?
>

Well it looks to go and find the best one out of the group.

> More generally do I do a check -b to see if that looks clean, and if so,
> what's the command to replicate that root onto all the other roots?
>

If you do -b and check finishes fine, you can do --repair and it'll reset the
super to point at the backup root, and theoretically you should be good to go?
Thanks,

Josef