How to present ZFS snapshot to MacOS as Time Machine backup?


Andrea3000

Recommended Posts

Hi,

 

I’m putting together a storage server and I’m planning to install Unraid and use the ZFS plugin to have a native ZFS pool as my main storage.

 

The client that will use the storage server the most, runs MacOS.

 

Currently I backup my data via USB using Time Machine.

Once the server will be up and running I plan to use ZFS snapshots to create periodic snapshots of all my datasets.

 

Is there a way to access the ZFS snapshots via Time Machine, in a similar way to what can be done in Windows with shadow copies?

In other words, is there a plug-in that allows to present the ZFS snapshot to MacOS as it were a Time Machine backup?

Link to comment
12 hours ago, gyto6 said:

You need to set a Zvol to receive an APFS on your pool dataset.

 

https://openzfsonosx.org/wiki/Time_Machine_Backups

 

No plug-in to clearly talk about, only a few commands relative to ZFS and NFS.


Thank you for the reply.
Maybe I misunderstood that article, but what I would like to do is to let Unraid and ZFS handle the snapshots of the data on the server, even when the Mac is off.

I would then like to use the Time Machine interface on the Mac to browse through the snapshots and restore files and folders if I need.

 

Is that possible?

Link to comment
16 hours ago, Andrea3000 said:


Thank you for the reply.
Maybe I misunderstood that article, but what I would like to do is to let Unraid and ZFS handle the snapshots of the data on the server, even when the Mac is off.

I would then like to use the Time Machine interface on the Mac to browse through the snapshots and restore files and folders if I need.

 

Is that possible?

It is.

 

Concerning the automatic snapshot, I'll let you do your choice. Dont forget that a snapshot is not a backup. But sending your snapchots (with Sanoid or ZnapZend) on another system through SSH, USB disk (not prefered) or ISCSI is a backup if the second system is out of touch of the first (fire, stealth.. )

 

I conclude that most of your files is located on your Unraid only, so what matters is the smb config. It requires the "fruit" argument to let MacOS handle zfs snapshots as Truenas does.

 

https://blog.gwlab.page/building-nas-with-zfs-afp-for-time-machine-d8d67add1980

Edited by gyto6
Link to comment
  • 1 month later...

Sorry @gyto6 for the very late reply, it took me much longer than expected to source the components to build the server.

I've now created a zfs dataset, and created few snapshots using:

zfs snapshot -r myPool/myDataset@now

 

I can see the snapshot being created with "zfs list -t snapshot"

NAME                  USED  AVAIL     REFER  MOUNTPOINT
myPool/myDataset@now  1.28M     -     1.32M  -

 

I've also created an SMB share that points to myDataset and I can access it via MacOS without issues.

 

I went through both of the guides that you linked in the posts above but I can't find a way to make the snapshots accessible to MacOS via SMB.

Am I missing something?

 

To be more specific, if on the server I browse to:

/myPool/myDataset/.zfs/snapshot

 

I can see the snapshot named "now" that I have created:

/myPool/myDataset/.zfs/snapshot# ls -a
./  ../  now/

 

 

From MacOS, if I browse to the share "myDataset" and then to the snapshot directory, I don't see any snapshot:

****@192 snapshot % pwd
/Volumes/myDataset/.zfs/snapshot
****@192 snapshot % ls -a
.	..

 

Edited by Andrea3000
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.