Replies: 2 comments 5 replies
-
If you use recursive=zfs (instead of recursive=yes) in sanoid, you can just
zfs rollback -r to do a recursive rollback on a series of nested datasets.
Does that mitigate your issue?
The only real downside to recursive=zfs on the sanoid side is that you can
no longer change policies effectively for child datasets, they get every
setting the recursion parent has, period, no ifs ands or buts.
…On March 14, 2023 17:31:21 Dan MacDonald ***@***.***> wrote:
reversoid because rollbackoid doesn't sound right to me.
reversoid should/could be a script included with sanoid for recursively
rolling back snapshots of groups of datasets (or a full pool?) by a
specified amount of time for snapshots created with sanoid.
I very much needed such a tool about a week ago.
Hows about it Jim?
Thanks
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
It is.
You're correct; I misremembered. Actually, I misremembered what the capital R version did, then misremembered that I was misremembering the effect of -R not of -r, so I'm not firing on all cylinders today, clearly. :)
OK, if you're using recursive=zfs (not recursive=yes) then you know for a fact that all child datasets of the dataset specified in the sanoid config module will have the exact same timestamp and name. This makes it pretty trivial to script a mass rollback of them all:
This gave us a list of the dataset specified, First, which snapshot do we want to roll back to? Let's assume we want to roll back to the most recent daily:
We piped the output of Now, we can roll everything back to that single daily snapshot:
As you can see, we're generating the correct commands to roll back
And we're done. |
Beta Was this translation helpful? Give feedback.
-
reversoid because rollbackoid doesn't sound right to me.
reversoid should/could be a script included with sanoid for recursively rolling back snapshots of groups of datasets (or a full pool?) by a specified amount of time for snapshots created with sanoid.
I very much needed such a tool about a week ago.
Hows about it Jim?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions