I overlooked something in the manual, I''m sure.. But I have a question: when I create a snapshot of a zfs filesystem and want to -return- to the state before that snapshot was taken, how do I do that? Thanks for any pointers. -Dick
Dick Hoogendijk wrote:> I overlooked something in the manual, I''m sure.. > But I have a question: when I create a snapshot of a zfs filesystem and > want to -return- to the state before that snapshot was taken, how do I > do that?Gday Dick, sounds like you''re looking for zfs 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 inter- mediate snapshots must be destroyed by specifying the -r option. -r Recursively destroy any snapshots more recent than the one specified. -R Recursively destroy any more recent snapshots, 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. See zfs(1M). cheers, James -- Senior Kernel Software Engineer, Solaris Sun Microsystems http://blogs.sun.com/jmcp http://www.jmcp.homeunix.com/blog
James, is there no way ZFS could be updated so that rolling back to an old snapshot doesn''t require destroying newer ones? I''m just thinking this could be handy with ZFS boot, allowing you to roll back to a previous configuration, while keeping the ability to roll forward again if you wanted. -- This message posted from opensolaris.org
Ross wrote:> James, is there no way ZFS could be updated so that rolling back to an old snapshot doesn''t require destroying newer ones? > > I''m just thinking this could be handy with ZFS boot, allowing you to roll back to a previous configuration, while keeping the ability to roll forward again if you wanted. >That''s what Live Upgrade provides. -- Ian.
>>>>> "r" == Ross <myxiplx at hotmail.com> writes:r> roll back to a previous configuration, while keeping r> the ability to roll forward again if you wanted. I believe that''s called a ``clone''''. It doesn''t make sense to roll back, write, roll forward, unless you will accept that you are branching the snapshot tree (=making a clone). -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 304 bytes Desc: not available URL: <http://mail.opensolaris.org/pipermail/zfs-discuss/attachments/20081013/e175dd56/attachment.bin>