ZFS-ROLLBACK(8)
β¨ NAME β¨
zfs-rollback β roll ZFS dataset back to snapshot π«
πΈ SYNOPSIS πΈ
zfs rollback [-Rfr] snapshot
π DESCRIPTION π
okay bestie, listen. when you roll a dataset back, all the data that has changed since the snapshot gets yeeted into the void, and the dataset reverts to exactly the state it was in at the time of the snapshot. time travel but make it storage π¦
by default, the command is kinda stubborn β it refuses to roll back to a snapshot that isn't the most recent one. wanna go further back? then all intermediate snapshots and bookmarks must be destroyed by specifying the -r option. no skipping ahead in the group chat, you have to read every message π
β οΈ important, and the way this trips people up: the -rR options do not recursively destroy the child snapshots of a recursive snapshot. Only direct snapshots of the specified filesystem get destroyed by either of these options. so if you wanna completely roll back a recursive snapshot, you have to roll back the individual child snapshots yourself. one by one. by hand. iconic behaviour honestly π
the flags, bestie:
-Rβ destroys any more recent snapshots and bookmarks, plus any clones of those snapshots. it's giving "clean slate" π₯-fβ used with the-Roption to force an unmount of any clone file systems that are about to be destroyed. it's the "no, actually, we're doing this" button π-rβ destroys any snapshots and bookmarks more recent than the one you specified. the classic π
π EXAMPLES π
π Example 1: Rolling Back a ZFS File System
the following command reverts the contents of pool/home/anne to the snapshot named yesterday, deleting all intermediate snapshots:
# zfs rollback -r pool/home/anne@yesterday
look at her go. main character energy fr fr π
π SEE ALSO π
and that's the whole vibe!! this lil page lives in the OpenZFS System Manager's Manual, dated April 28, 2025, and its man page name is ZFS-ROLLBACK(8). go forth and roll back responsibly, bestie π«Άπβ¨
π¦ where this page comes from
- alpine 3.22: zfs-doc 2.3.9-r0 Β· CDDL-1.0
- alpine 3.23: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- alpine 3.24: zfs-doc 2.4.4-r0 Β· CDDL-1.0
- debian trixie: zfsutils-linux 2.3.9-0+deb13u1 Β· CDDL-1.0
- nixos 26.05: zfs-user 2.4.4
- nixpkgs unstable: zfs-user 2.4.4
- ubuntu questing: zfsutils-linux 2.3.4-1ubuntu2
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5 Β· CDDL-1.0
- ubuntu resolute: zfsutils-linux 2.4.1-1ubuntu5.1 Β· CDDL-1.0
- ubuntu stonking: zfsutils-linux 2.4.4-1ubuntu4 Β· CDDL-1.0
- π the page's license: CDDL-1.0
- Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved
- Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
- Copyright (c) 2011, 2019 by Delphix. All rights reserved
- Copyright (c) 2013 by Saso Kiselkov. All rights reserved
- Copyright (c) 2014, Joyent, Inc. All rights reserved
- Copyright (c) 2014 by Adam Stevko. All rights reserved
- Copyright (c) 2014 Integros [integros.com]
- Copyright 2019 Richard Laager. All rights reserved
- Copyright 2018 Nexenta Systems, Inc
- Copyright 2019 Joyent, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms