[indiana-discuss] zfs snapshot

Tim Foster Tim.Foster at Sun.COM
Wed Dec 5 02:54:17 PST 2007


Hi John,

On Wed, 2007-12-05 at 02:41 -0800, John Hawk wrote:
> Thus if I do 'zfs snapshot zpl_slim at today' and then a clone I simply destroy 
> the clone and promote the snapshot to return to original state.
> 
>  example:
>  # zfs snapshot zpl_slim at today
>  # zfs clome zpl_slim at today zpl_slim/test
>  # zfs destroy zpl_slim/test
>  # zfs promote zpl_slim at today
>  Back to original state
>  
>  Is this accurate?

Not quite - zfs promote flips the dependency between clones and their
parent filesystems.

What you really want to do is:

# zfs snapshot zpl_slim at today
# zfs clone zpl_slim at today zpl_slim/test
# zfs destroy zpl_slim/test
# zfs rollback zpl_slim at today

To do the last step, you may need to be booted from an alternate root
(or a livecd) since datasets zpl_slim will be in use, they including the
current root filesystem.

And now zpl_slim is back to the state it was in @today with no dependent
clones.

Check out the excellent ZFS administration guide at
http://docs.sun.com/app/docs/doc/819-5461/6n7ht6qs9?a=view

	cheers,
			tim

-- 
Tim Foster, Sun Microsystems Inc, Solaris Engineering Ops
http://blogs.sun.com/timf



More information about the indiana-discuss mailing list