Hello,
So, after a small adventure that I will document elsewhere since it led to some other questions and potential improvement requests for TrueNAS’ documentation, I’ve got a multi-user Time Machine backup setup configured on TrueNAS, with each Time Machine client backing up into a separate dataset. Using the TrueNAS built-in options for Time Machine shares, a ZFS snapshot is taken after each successful backup, and snapshots older than 7 days purge themselves. (The process to set this up is a bit obscure, so I’ll document it elsewhere).
What I’d like to focus on and get some help with is the size of my ZFS snapshots and the complete lack of compression on my Time Machine dataset for my test Mac.
- The dataset is using the LZ4 default compression;
- Encryption is disabled on the dataset;
- On the test Mac, encryption is enabled;
- The test Mac backs up (and ZFS takes a snapshot) every hour; and
- I have observed TrueNAS purging the oldest snapshots on schedule.
That is all, somehow, despite my middling competence, working as intended. However, my dataset looks like this:
Yes. 35 percent of the 1.39 TiB there is my actual Time Machine sparsebundle, and the rest is ZFS snapshots.
Now, I suppose it’s possible that I’m somehow writing 4-6 GiB of data per hour to my SSD, even when my system is idling overnight. But somehow I doubt it.
So, that’s ridiculous and I’m pretty sure it’s not how that’s meant to work for a client system that sits idle most of the time.
(I’m sure I need to further flesh out my Time Machine exclusions, as the Mac copies ~1.5-2.0 GiB to the NAS on every backup, but that’s a separate problem. I don’t want to get distracted dealing with my Exclusions list until I’ve got a better handle on what’s happening on the storage server. Still, a suggested exclusion list for Time Machine would always be appreciated.
)
I promised (or suggested) that there would be questions so:
- Is the lack of compression because I’ve encrypted the data on the test Mac itself? When I saw a compression ratio of 1, I assumed that ZFS is looking at the encrypted TIme Machine data and noping out.
- Fellow Time Machine enjoyers, is it normal for your snapshots to be this huge? I can’t imagine it’s meant to be this way, and I assume, again, that it’s got to do with the client-side encryption. It makes sense that ZFS can’t track real block deltas on data that’s encrypted before it arrives.
- Would using ZFS’ own encryption get me a better result? I’m assuming that without encryption on the client-side, incoming data would be compressed before encryption, and something something snapshots would have a better time with block deltas on things ZFS encrypted itself. Maybe.
Ref: Part of a series on my Time Machine/ZFS/TrueNAS fumblings at: My Adventures with TrueNAS, ZFS, and Time Machine: A Master Post

