Solved Are these two paragraphs contradictory?

"Taking a snapshot of the current state of the dataset before rolling back to a previous one is a good idea when some data is required later. This way, the user can roll back and forth between snapshots without losing data that is still valuable."

"This warning means that snapshots exist between the current state of the dataset and the snapshot to which the user wants to roll back. To complete the rollback, these snapshots must be deleted. "

If taking a snapshot of the current state of the dataset before rolling back to a previous one as described in the first paragraph, then in the second paragraph, to roll back to an earlier snapshot, all recent snapshots must be deleted, which of course includes the one created before the rollback.

So isn't it useful to create a snapshot before rolling back?
 
Can't really comment on any of this because it lacks context. For example: where do these text snippets come from? I mean, the second line even mentions a warning yet what warning is left to our imagination. That doesn't really help ;)

So isn't it useful to create a snapshot before rolling back?
Not really, see also zfs(8) (section about rollback):
Code:
         By default, the command refuses to roll back to a snapshot
         other than the most recent one. In order to do so, all intermediate
         snapshots and bookmarks must be destroyed by specifying the -r
         option.
 
Now I see what the OP is getting at. This text comes from chapter 19.4 of the handbook; section 19.5.3 to be exact.

Correct, there's an inconsistency in the handbook: those sections definitely contradict each other. The first part mentions:

Taking a snapshot of the current state of the dataset before rolling back to a previous one is a good idea when some data is required later. This way, the user can roll back and forth between snapshots without losing data that is still valuable.
This is total nonsense. Something which is also shown later:

snapshots exist between the current state of the dataset and the snapshot to which the user wants to roll back. To complete the rollback, these snapshots must be deleted.
.

I'll file a PR to request that the offending line gets removed.

(edit): PR230037 is now a thing.
 
Back
Top