Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

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

Featured Replies

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?

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.

Edited by gyto6

  • Author
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?

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

I'll add that, in the link provided, the user set a 32k recordsize. That's important because it refers to APFS default sector size. So it's important for interoperability to use this recordsize for your dataset.

  • 1 month later...
  • Author

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

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...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.