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

Support Rollback function #20

Open
jonmatifa opened this issue Jan 17, 2018 · 0 comments
Open

Support Rollback function #20

jonmatifa opened this issue Jan 17, 2018 · 0 comments

Comments

@jonmatifa
Copy link
Owner

jonmatifa commented Jan 17, 2018

From discussion in issue #19, there seems to be some interest in a rollback function.

Here's the current manpage description of rollback:

zfs rollback [-rRf] snapshot


           Roll  back the given dataset to a previous snapshot. When a dataset is rolled back, all
 data that has changed since the snapshot is discarded, and the dataset reverts to the state at 
 the time  of  the  snapshot.  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.

           The -rR options do not recursively destroy the child snapshots of a recursive snapshot. 
 Only direct  snapshots  of  the  specified  filesystem  are destroyed by either of these options. 
 To  completely roll back a recursive snapshot, you must  rollback the individual child snapshots.

           -r

               Destroy any snapshots and bookmarks more recent than the one specified.

           -R

               Recursively destroy any more recent snapshots and bookmarks, as well as any 
 clones of those snapshots.

           -f

               Used with the -R option to force an unmount of any clone file systems that are to 
be  destroyed.

This will be relatively straight forward to implement, I just want to be sure the UI gives ample warning of the destructive behavior of rolling back. The key thing for me is that intermediate snapshots must also be destroyed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant