Time Machine over SMB (Mac OS Sierra)


Recommended Posts

Apparently as of Mac OS Sierra 10.12, Time Machine can run over SMB. However there is some work that needs to happen to make this work, so not just any SMB share will appear. Apple has a specification page for Time Machine over SMB. I know LimeTech has wanted to drop AFP support, getting Time Machine running over SMB would surely drop my resistance to that!

 

https://developer.apple.com/library/content/releasenotes/NetworkingInternetWeb/Time_Machine_SMB_Spec/

  • Upvote 2
Link to comment
  • 1 month later...
  • 3 months later...
  • 5 months later...
On 23/09/2017 at 9:36 AM, wgstarks said:

With macOS High Sierra, AFP has been deprecated. Time Machine backups via AFP will no longer be possible.

 

I can see that some work is underway with vfs_fruit to support TM backups via samba. Hopefully LT will integrate this functionality soon.

 

I'm experiment with that right now. Apparently it's easier than you think with 6.4-rc9f

  • Like 1
Link to comment
23 minutes ago, wgstarks said:

Does this permissions issue still occur in the latest RC? Pretty sure the ownership problems are being caused by vfs_fruit. Only happens when connecting as a registered user from a Mac.

 

I think it got fixed:

 

[TimeMachine2]
	path = /mnt/user/TimeMachine2
	ea support = Yes
	valid users = guilherme
	write list = guilherme
	vfs objects = catia fruit streams_xattr
	fruit:encoding = native
	fruit:locking = none
	fruit:metadata = netatalk
	fruit:resource = file

 

root@Servidor:/mnt/user/TimeMachine2# ls -la
total 24
drwxrwxrwx 1 nobody    users    58 Sep 25 09:57 ./
drwxrwxrwx 1 nobody    users   126 Sep 25 08:57 ../
-rw-rw-rw- 1 guilherme users 10244 Sep 25 09:58 .DS_Store
drwx------ 1 guilherme users  4096 Sep 25 09:35 MacBook\ Air\ de\ Guilherme.sparsebundle/
drwxrwxrwx 1 guilherme users    31 Sep 25 09:58 Test\ Folder

 

root@Servidor:/mnt/user/TimeMachine2/Test Folder# ls -la
total 16
drwxrwxrwx 1 guilherme users    31 Sep 25 09:58 ./
drwxrwxrwx 1 nobody    users    58 Sep 25 09:57 ../
-rw-rw-rw- 1 guilherme users 13304 Sep 25 09:58 test\ file.txt

 

Link to comment

From what I see after upgrading to High Sierra, time machine backups *to* an APFS disk are not possible over AFP.
However, I don't believe this affects backing up an APFS disk to Unraid (or other non-APFS disk).

 

See here:

https://support.apple.com/en-gb/HT208018


"Volumes formatted as APFS can't offer share points over the network using AFP. "
"Any Time Machine share points must be shared over SMB instead of AFP."


So the limitation isn't the source disk you are backing up, but rather the target disk you are backing up to.

As far as I can tell, there's no issue continuing to use my existing Unraid backup target.

Edited by SnickySnacks
Link to comment
8 hours ago, wgstarks said:

So your saying that this statement from Apple only applies if the source is AFPS and the target is also AFPS?

 

I'm not sure. People online say that APFS target time machine disks will be converted to HFS because APFS can't be a Time Machine target.

I did a quick test this morning and it seemed to work APFS -> Unraid but I didn't let it actually do the backup.
The more I read today, the more worried I became that I was wrong so I took my work laptop back home and tried again.

I can confirm that this *does* work.

I suspect the restriction is backing up TO something running High Sierra requires SMB, but honestly I'm losing interest in verifying this. :P



 

IMG_4536.JPG

IMG_4537.JPG

Edited by SnickySnacks
Link to comment
  • 9 months later...
  • 2 months later...
  • 3 weeks later...

Ok, got it, and it's should not be that difficult to implement.

 

My idea is, when you enable Enhanced OS X interoperability, the UI should let user enable Time Machine (add fruit:time machine = yes in the share section in smb-shares.conf) and let the user set the maximum size (fruit:time machine max size = xxx [K|M|G|T|P] in the share section in smb-shares.conf).

 

The only other thing needed is to advertise it using the Avahi SMB service:

 

 <service>
   <type>_adisk._tcp</type>
   <port>0</port>
   <txt-record>dk[number]=adVN=[share name],adVF=0x82</txt-record>
 </service>

Just change the [number] with a disk number from 1-10000 and [share name] with the correct share name.

 

Is it doable, @limetech and @bonienl?

 

Edited by gfjardim
Link to comment
12 minutes ago, gfjardim said:

Ok, got it, and it's should not be that difficult to implement.

 

My idea is, when you enable Enhanced OS X interoperability, the UI should let user enable Time Machine (add fruit:time machine = yes in the share section in smb-shares.conf) and let the user set the maximum size (fruit:time machine max size = xxx [K|M|G|T|P] in the share section in smb-shares.conf).

 

The only other thing needed is to advertise it using the Avahi SMB service:

 


 <service>
   <type>_adisk._tcp</type>
   <port>0</port>
   <txt-record>dk[number]=adVN=[share name],adVF=0x82</txt-record>
 </service>

Just change the [number] with a disk number from 1-10000 and [share name] with the correct share name.

 

Is it doable, @limetech and @bonienl?

 

 

Yes very similar to what I'm doing 👍

One thing I'm not sure about and haven't tested yet: If a share is being used for TimeMachine via AFP/netatalk, and then we switch to SMB, will OS X still recognize the existing sparse bundles (I think that's what they're called)?

Link to comment
16 minutes ago, limetech said:

 

Yes very similar to what I'm doing 👍

One thing I'm not sure about and haven't tested yet: If a share is being used for TimeMachine via AFP/netatalk, and then we switch to SMB, will OS X still recognize the existing sparse bundles (I think that's what they're called)?

Yes. I just backed up using SMB to a sparse bundle I used to back up to through AFP.
 

Link to comment
46 minutes ago, gfjardim said:

Yes. I just backed up using SMB to a sparse bundle I used to back up to through AFP.
 

Good to know, thank you for the report!  I've been wanting to get rid netatalk along with it's stupid CNID database for a long time, actually never wanted to add it in the first place.  Now to get rid of NFS with it's stupid file handles....

Link to comment
11 minutes ago, limetech said:

Good to know, thank you for the report!  I've been wanting to get rid netatalk along with it's stupid CNID database for a long time, actually never wanted to add it in the first place.  Now to get rid of NFS with it's stupid file handles....

I think you should let netatalk in place for a while, not all Macs can be updated to Sierra or High Sierra.

If you need someone to proper test it before production, let me know.

Link to comment
5 minutes ago, gfjardim said:

I think you should let netatalk in place for a while, not all Macs can be updated to Sierra or High Sierra.

If you need someone to proper test it before production, let me know.

Yes plan is to deprecate but not remove just yet.  Thank you for the testing offer, much appreciated and we will need it.

Link to comment

@gfjardim, have I understood correct that I have to modify my /boot/config/smb-extra.conf and adding the following:

fruit:time machine = yes

fruit:time machine max size = 2T

 

If the answer is yes I have to remaining questions:

  • Adding 2T if I would like to use 2TB for my TM backup is correct as shown above?
  • Where do I have to "...advertise it using the Avahi SMB service"?

Thanks a lot for clarifying.

Edited by EdgarWallace
Link to comment
@gfjardim, have I understood correct that I have to modify my /boot/config/smb-extra.conf and adding the following:
fruit:time machine = yes
fruit:time machine max size = 2T
 
If the answer is yes I have to remaining questions:
  • Adding 2T if I would like to use 2TB for my TM backup is correct as shown above?
  • Where do I have to "...advertise it using the Avahi SMB service"?
Thanks a lot for clarifying.
I don't advise you to try enable it manually because all changes needed will be overwritten by Unraid eventually. I did a test, not tried to put it into production. Let's wait LT implement it the right way to avoid breake something.
Link to comment
Welp, my old Time Capsule finally died, so I'm going to set up my Unraid box to serve as the Time Machine backup host.
 
What's the status of this? Should I wait for official support, or use one of the manual setup methods posted here and there?
 
Thanks all!
It's supported if used with AFP (Apple's own network filesystem). Since AFP will be deprecated, we are discussing the usage of SMB as successor of AFP.
  • Upvote 1
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.