[OpenIndiana-discuss] ZFS Rollback Question
Timothy Coalson
tsc5yc at mst.edu
Sat Mar 9 00:29:28 UTC 2013
On Fri, Mar 8, 2013 at 6:18 PM, DormitionSkete at hotmail.com <
dormitionskete at hotmail.com> wrote:
>
> On Mar 8, 2013, at 5:04 PM, Timothy Coalson wrote:
>
> > Correction to 1)...first off, you did use -r, but second, from the man
> page:
> >
> > " The -rR options do not recursively destroy the child
> > snapshots of a recursive snapshot. Only the top-level
> > recursive snapshot is destroyed by either of these
> > options. To completely roll back a recursive snapshot,
> > you must rollback the individual child snapshots."
> >
> > Tim
> >
>
> Ok. Now I'm real confused. Assuming I had done something like this:
>
> zfs snapshot rpool/zones/tomcat/ROOT/zbe at whatever
>
Actually, you would have needed to use snapshot -r on the zone path
(without ROOT/zbe) for my answer to be relevant, my bad.
> Done my work.
>
> In the meantime, other auto snapshots were created...
>
> This would not have worked:
>
> zfs rollback -r rpool/zones/tomcat/ROOT/zbe at whatever
>
That would have worked with your changed snapshot line, yes.
> ?
>
> What would I have had to do to correct this? Roll back each snapshot
> successively? That could be kind of unpleasant if a lot of time had passed
> and a person needed to rollback through a lot of snapshots.
>
If you had used "zfs snapshot -r rpool/zones/tomcat at whatever", to get rid
of all newer snapshots and changes on all the filesystems, you would need
to do zfs rollback -r on all of:
rpool/zones/tomcat
rpool/zones/tomcat/ROOT
rpool/zones/tomcat/ROOT/zbe
However, the first two wouldn't really matter, since those filesystems are
empty, only the third would cause changes to the zone's files.
So, I guess the lesson learned is: don't do snapshots on zone paths without
ROOT/zbe, recursive or otherwise.
Tim
More information about the OpenIndiana-discuss
mailing list