Solved: How to backup ZFS pools with Time Machine

New to OpenZFS on OS X (Or ZFS in general)? Ask your questions here!

Solved: How to backup ZFS pools with Time Machine

Postby Fnuxus » Tue Apr 14, 2020 8:01 am

After some research there seems to be consensus that backups of ZFS media with Time Machine do not work.

Apparently I found a solution to this problem.

N. B. This is not about using ZFS as a Time Machine target volume! (See https://openzfsonosx.org/wiki/Time_Machine_Backups for using ZFS as backup target.)

This is about backing up ZFS volumes with Time Machine!

Here is how it works:

Either create a ZFS pool and turn on HFS mimic

Code: Select all
sudo zfs set com.apple.mimic_hfs=on myPool


or create a ZFS pool with a HFS+ or APFS zvol on top:

https://openzfsonosx.org/wiki/Time_Mach ... kups#zvols

Open Terminal.app and do this:

1. First we check for demonstration purposes if the volume is currently backed up:

Code: Select all
tmutil isexcluded /Volumes/myPool
[Excluded]    /Volumes/myPool


2. Now we use tmutil to include the pool:

Code: Select all
sudo tmutil removeexclusion -v /Volumes/Zetes
Password:


N. B.: This does not change the appearance in the Time Machine control panel – it is still greyed out.

3. Now we check the backup status again:

Code: Select all
isexcluded /Volumes/Zetes
[Included]    /Volumes/Zetes


Voilà!

Backing up and restoring a 2 GB iPhoto .photolibrary to and from Time Machine worked with HFS mimic and an APFS volume flawlessly.

I didn’t test a HFS+ zvol on top of HFS, but I assume it works as well.
Use this information at your own risk!
User avatar
Fnuxus
 
Posts: 7
Joined: Tue Apr 14, 2020 7:17 am

Re: Solved: How to backup ZFS pools with Time Machine

Postby TooDizzy » Mon Jun 01, 2020 3:53 am

Very nice! Will need to try this!
TooDizzy
 
Posts: 9
Joined: Sun May 25, 2014 8:52 am


Return to Absolute Beginners Section

Who is online

Users browsing this forum: No registered users and 10 guests