Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zfs rollback --last[=N] #16977

Open
ChristophSchmidpeter opened this issue Jan 22, 2025 · 0 comments
Open

zfs rollback --last[=N] #16977

ChristophSchmidpeter opened this issue Jan 22, 2025 · 0 comments
Labels
Type: Feature Feature request or new feature

Comments

@ChristophSchmidpeter
Copy link

ChristophSchmidpeter commented Jan 22, 2025

Describe the feature would like to see added to OpenZFS

I suggest the addition of following syntax (unless somebody suggests a better syntax):

zfs rollback --last[=N] <pool/dataset> and zfs rollback -l [N] <pool/dataset>

e.g. zfs rollback --last[=N] MyPool/MyDataset rollbacks to the last and zfs rollback --last=1 MyPool/MyDataset rollbacks to the penultimate snapshot

How will this feature improve OpenZFS?

I often want to rollback to the last snapshot of a dataset.

And I have to do something like:

$zfs list -t snap long/path/to/filesystem
[...]
zfs rollback long/path/to/filesystem@long_snapshot_name

zfs rollback long/path/to/filesystem@long_snapshot_name

which is quite tedious, especially if I am e.g. in zfsbootmenu where I don't have autocomplete and a mouse / way to copy to clipboard.

There should be a way to refer to the last / last-x snapshot directly, similarly like with e.g. git rebase -i HEAD~4

Additional context

@ChristophSchmidpeter ChristophSchmidpeter added the Type: Feature Feature request or new feature label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature Feature request or new feature
Projects
None yet
Development

No branches or pull requests

1 participant