Page 1 of 1

Any way to have ZFS backed up by Time Machine?

PostPosted: Sat Jun 30, 2018 1:33 pm
by RobRehnmark
Is there any way to have any kind of volume or disk image on ZFS and have it backed up automatically by Time Machine?

Or is the only way to have some script make snapshots and send them to the server?
..or something?

Re: Any way to have ZFS backed up by Time Machine?

PostPosted: Sat Jun 30, 2018 4:50 pm
by Sharko
Well, you could create a ZVOL within your pool, which OS X will see as a uninitialized volume and can then create an HFS+ filesystem on. At that point the volume is truly Time Machine compatible in every sense. You only get some of the ZFS goodness, however; the volume must be unmounted to snapshot it, for instance. But you will get some of the benefits: underlying pool redundancy can auto-correct bit rot, compression will reduce the size of data stored on disk, snapshots of the ZVOL can be replicated, etc.

I'm not sure if a standard ZFS dataset will be compatible, perhaps someone who has tried it can chime in.

Re: Any way to have ZFS backed up by Time Machine?

PostPosted: Sun Jul 01, 2018 9:38 am
by RobRehnmark
Sharko wrote:Well, you could create a ZVOL within your pool, which OS X will see as a uninitialized volume and can then create an HFS+ filesystem on.


This is what I thought too but it doesn't seem to be working! :|
All I want is the stuff you're describing. Redundancy, bit rot correction, perhaps compression but not necessary...
I want to use it for iTunes/Photos media, downloads, etc. and it seems to be working great except it's on the Excluded list in Time Machine settings.
Is it still being backed up?
(I haven't REALLY checked.)
If this is the case then I have another problem.
I can't add individual folders on that volume to the Excluded list.

The "HFS+ with journaling" volume is Trench.
Skärmavbild 2018-07-01 kl. 19.31.25.png
Skärmavbild 2018-07-01 kl. 19.31.25.png (37.07 KiB) Viewed 5615 times

Re: Any way to have ZFS backed up by Time Machine?

PostPosted: Sun Jul 08, 2018 2:32 pm
by nodarkthings
Hi!
After various tests, a few years ago, I've found that using a .sparsebundle on a ZFS pool was the simplest solution, especially for Time Machine.
Time has proven to me that it was the good choice for my use case.

Re: Any way to have ZFS backed up by Time Machine?

PostPosted: Tue Oct 23, 2018 1:30 am
by RobRehnmark
I am now running 10.14 Mojave and the HFS+ formatted ZVOL is still not backed up to TimeMachine.

-BUT- it seems the zfs volume with mimic HFS is being backed up... :lol:
Looks like I just have to move my important data off the ZVOL and it will be alright.
But first I will upgrade to ZFS 1.8.1 and test a little bit.

Re: Any way to have ZFS backed up by Time Machine?

PostPosted: Thu Oct 25, 2018 5:39 am
by leeb
RobRehnmark wrote:Or is the only way to have some script make snapshots and send them to the server?

I prefer to do it this way, I always found Time Machine quite flakey and taking advantage of native ZFS snapshotting and send/receive to me is one of the major advantages of it, though ymmv. I don't know of any GUIs off the top of my head, but there are plenty of premade fairly sophisticated CLI tools that can take care of a lot of the setup for you, ZnapZend for example. Others include sanoid,

There are other alternatives to TM as well in terms of having something on top of ZFS rather then ZFS directly, like restic or even rsync. Carbon Copy Cloner puts a nice GUI and setup aid on top of rsync with some macOS specific support, and it does include preflight/postflight script options so you can combine it with ZFS to some extent too. I've used that to handle an HFS/APFS formatted boot volume for example, having CCC backup to a sparsebundle on a pool or a formatted zvol and then snapshot after it finishes, and then that's automatically part of the replication.

At any rate if you really want a GUI can just use TM, but particularly now with some of the enhanced replication features ZFS has gotten over the last few years like send/receive and bookmarks it's worth considering trying to use it, if you have the time.