Interactive, file-level Time Machine-like tool for ZFS
github.com
github.com
If you use ZFS a bunch, like I do, you will use this little tool more than you may imagine.
Also, FYI, for the trivia/history buffs -- cool bit of happenstance -- 20 years ago yesterday Jeff Bonwick filed the PSARC case for the ZFS filesystem. See: https://illumos.org/opensolaris/ARChive/PSARC/2002/240/onepa...
Sadly, the screenshots seem to be gone...
https://web.archive.org/web/20081016104234/http://blogs.sun....
edit: found a couple places with the UI:
https://www.linuxjournal.com/content/zfs-finding-its-way-lin...
https://arstechnica.com/information-technology/2008/10/opens...
Edit: Nicer screenshot: https://www.openindiana.org/documentation/gallery/oi-b148-gu...
But, then, BtrFS can do that too.
For example, if your home is a separate dataset, then `/home/operator/.zfs/` will contain all snapshots automatically mounted for your convenience.
After that you can see it with `ls -la`.
Might this be a security issue as well? What permissions are needed to access this path? If I somehow have a webserver serving static files from a zfs dataset, might someone use this to access old or deleted files?
Looks like by default the `.zfs/snapshot` folder is owned by root, but has 777 permissions. Then inside the snapshots themselves they have the same permissions as the main pool.
Not sure if there is a way to configure permissions on it, but if security is a concern, you could leave it disabled with `snapdir=hidden`, then just set it to `visible` if you need in there. I think it's disabled by default, so if you haven't gone out of your way to turn it on you're probably good. If you want to leave it visible all the time, you probably want apparmor or something to manage access.
Would list the files sorted by change date so then I could just easily scan through the list for the changed versions.
I always thought that was a petty reason but I didn't really consider it beyond Steve Jobs to do that to be honest. He really took such matters very personally.
But your explanation sounds more reasonable. I really thought this until now though.
* https://web.archive.org/web/20121221111757/http://mail.opens...
if only ZFS hadn't fallen through! Speaking of which, are there any public plans to do this with APFS or are they just trying to push everyone into the cloud?
One interesting fact about the entire presentation of all the new features is that all of the backup Macs but one had crashed by the end. If you watch closely you can see the mirrored demo machines switching in when the live demo box locks up. Whee!
That unfortunately happened in the good timeline where Scheme in the browser also happened.
> That unfortunately happened in the good timeline where Scheme in the browser also happened.
Oh man that would be amazing. It would be so much better than javascript!
Re Scheme: It was the first choice of Javascript’s inventor, Brenden Eich, but the suits didn’t go for it. If you want to have a good cry, look up DSSSL and imagine the alternate timeline with S-expressions instead of HTML, DSSSL instead of CSS, and Scheme instead of Javascript.
Pretty sure there’s also a robust open source OpenStep or NeWS ecosystem instead of X11, Al Gore was a two termer, and 9/11 never happened.
It was not licensing. ZFS is licensed the exact same way as Dtrace, and Dtrace is part of Mac OS / macOS.
It was signing a 'support' contract with Sun: terms couldn't be agreed to. From Jeff Bonwick (co-creator of ZFS) on the zfs-users list at the time:
> Apple can currently just take the ZFS CDDL code and incorporate it
> (like they did with DTrace), but it may be that they wanted a "private
> license" from Sun (with appropriate technical support and
> indemnification), and the two entities couldn't come to mutually
> agreeable terms.
I cannot disclose details, but that is the essence of it.
* https://web.archive.org/web/20121221111757/http://mail.opens...Considering that Apple would be rolling it out to many users through high margin computers this is a reasonable concern.
I hear you about a ZFS root partition, though
The sad thing is that they didn’t open-source APFS. They could have done that at 0 cost and scored a lot of awesomeness points.
I've used APFS on my Mac, and it worked well enough that I didn't have to think about. Now I've been using ZFS on my daily driver Linux PC and I don't have to think about it either.
I actually prefer ZFS for being able to set up transparent compression. But other than that, I'd be hard-pressed to pick a favorite.
If you're going to put a third-party's technology into your products (i.e., the file system that everything is built on), having extra assurances with regards to support and development is not crazy.
Apple tends to buy companies that make the technology they based their products on, but wasn't really going to happen with Sun. At best they'd have to poach the entire ZFS team, but there could still be things like patents and such (which they're allowed to use via the CDDL).
Yes, they incorporated Dtrace, but that wouldn't be a big deal to rip out if things went sideways legally-speaking.
Changing and depending on a file system is a BFD.
Then Oracle bought Sun, and thats when everything fell apart. Presumably Apple deemed it too much of a legal risk to use zfs even with the CDDL, because of how litigious Oracle is.
Kind of surprising given how close Ellison and Jobs were: Steve was the 'official' photographer at Larry's wedding.
* https://petapixel.com/2010/10/08/steve-jobs-the-wedding-phot...
All the talks about backups but the reason people don't do it is partly because the tooling is so bad. (no, snapshots is not a proper backup by itself, but a great addition to).
Wondering if btrfs will get some love too.
Thanks! (It's my little project.)
> I've often wondered why so little focus is spent on tools like this. Feels like low hanging fruit given the great usability improvements they can bring.
100% agree. Definitely a QoL tool for the ZFS lover. The zsh key bindings open up uses I never really even dreamed up, because it's just so quick to get to a usable interface.
Definitely also a very UNIX-y tool too. Recently I started fiddling with piping to git repos and tar archives and it's very cool -- see: https://github.com/kimono-koans/httm#example-usage
> Wondering if btrfs will get some love too.
btrfs makes this exact thing harder, but, cross fingers, the btrfs devs are listening, because I think btrfs folks would love a ".btrfs" directory like the ".zfs" directory.
If you wanted to file an issue and you could perhaps explain (I need your expertise!) how to parse the correct sub volume mount points from `mount` or `btrfs` or whatever command to make this work consistently for all cases, I'd jump right on it.
vfs objects = shadow_copy2
shadow:snapdir = /home/.zfs/snapshot/
shadow:basedir = /home
shadow:sort = desc
shadow:format = auto:%Y-%m-%dT%H_%M_%SZSpeaking of, any stats out there on which proportion of ransomware is targeted at which distro for linux, freebsd, windows and mac os?
Just don’t. Why would anyone use ReFS? It’s a project that Microsoft have failed miserably at, and it’s basically abandonware.
I would note -- one advantage of being a file level tool is `httm` will deduplicate file versions by size and modify time giving you only unique file versions. If you take 100 snapshots but the file was only modified 5 times, then you only see 5 file versions, so no more digging through snapshots ever.
vfs objects = shadow_copy2
shadow:snapdir = .zfs/snapshot
shadow:sort = desc
shadow:format = zfs-auto-snap_frequent-%Y-%m-%d-%H%MSpeaking of, I always forget this exists too:
Daemon for automatic incremental backup of your ZFS systems to the another (physically connected right now) pool.