Guide: Setting up a Time Machine Share on your Unraid 6.7 Server


Recommended Posts

My backup has JUST started to actually run this morning. I started it at 08:00 and it's now 14:47 and it's backed up 1.77Gb!!!

 

Why is it soooo slow?   I've tried all solutions posted on the forums and nothing works.  Can someone from Unraid chip in? I purchased Unraid to use it for Time Machine purposes as well as a Plex Media Server and it simply does not work reliably for TM.

 

I did try topost my message in my previous thread about TM but it appears to no longer exist.

 

I'm really getting fed up of this not working in Unraid. Please support your customers!   I am happy to provide anything you may need from my server to help investigate the problems

 

 

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

to speed it up a little bit you can

 

1. disable SMB signing if you do not care about your network security much at home.

run these commands in terminal

sudo -s
echo "[default]" >> /etc/nsmb.conf
echo signing_required=no >> /etc/nsmb.conf
exit

Check if SMB signing is disabled on your share after you remount the SMB volume:

smbutil statshares -a 

This variable should not show up after you have disabled SMB signing.                                SIGNING_ON                    TRUE

 

source

 

2. Speed up browsing on network shares

To speed up SMB file browsing, you can prevent macOS from reading .DS_Store files on SMB shares. This makes the Finder use only basic information to immediately display each folder's contents in alphanumeric order. Use this Terminal command:

 

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool TRUE

Then log out of your macOS account and log back in.

To reenable sorting, use this command:

defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool FALSE

 

source

 

3. disable throttling

 

sudo sysctl debug.lowpri_throttle_enabled=0

This command prevents Time Machine’s backup process assuming a low CPU priority

 

this command is forgotten when you reboot. If you want it to stick around when you reboot, you’ll need to add a launch-time script, as follows.

 

sudo nano /Library/LaunchDaemons/nothrottle.plist

Copy and paste in the following chunk of code:

 

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>nothrottle</string>
<key>ProgramArguments</key>
<array>
<string>/usr/sbin/sysctl</string>
<string>debug.lowpri_throttle_enabled=0</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>

In the Terminal window, tap the Ctrl+O keyboard shortcut (that’s Ctrl, not Cmd!) and then hit Enter. Then tap Ctrl+X.

 

In the Terminal window, paste in the following single line

 

sudo chown root /Library/LaunchDaemons/nothrottle.plist;sudo launchctl load /Library/LaunchDaemons/nothrottle.plist

 

Should in future you want to turn off this new command, type the following, which again is a single line:

sudo launchctl unload -w /Library/LaunchDaemons/nothrottle.plist

and reboot.

 

this is at the moment maximum you can do to speedup the timemachine backup.

 

Link to comment
  • 2 months later...
On 5/23/2021 at 1:05 PM, DargoThePooh said:

Any updates on this?

I'm running MacOS Mojave (10.14.6) and Unraid 6.9.2, and haven't been able to connect to my existing Time Machine share since upgrading to the latest Unraid OS. I'm about ready to buy another external and connect it directly to my OSX machine.

 

On 5/23/2021 at 1:09 PM, cinereus said:

I think it's still an advertised feature that simply doesn't work.

 

This guide was made using macOS High Sierra. Unfortunately, something changed in the ensuing Apple releases and I have been unable to track down what changed. I will reach out to Spaceinvader One to see if he has found a workaround as well.

 

In the meantime, here is a workaround using an un assigned disk via Unassigned Devices: 

 

Link to comment
  • 1 month later...

Ever since i upgraded to unraid 6.9.2, my timemachine stopped working. Had it set up using spaceinvaders tutorial.

Now, whatever i do, tm just cant find the disk where the timemachine share is anymore.

 

Even removed my old timemachine share... (nice, no backups anymore...) hoping i could create a new one, or maybe the tm share got to big, but no matter what i do, i just can't get this f-ing thing to work on unraid.

 

It was always a hassle, but this time it looks like it's really broken. 

Link to comment
  • 6 months later...

Ok, I have it working. I think. The backup is running now. I used different guides from these forums and ReddIt and also the official samba and vfs_fruit man pages. 

 

Situation:

  • Client: macOS Monterey 12.1
  • Server: Unraid 6.9.2

I have a Backups share as a staging area for servers and clients to put files before they're back-upped to the cloud. This share I made available to Apple's Time Machine with the following settings:

 

First, the global SMB settings in Settings > SMB:

  • Enhanced macOS interoperability: Yes

  • Enable NetBIOS: No

 

Second, the SMB Extras settings in Settings > SMB (stored in /boot/config/smb-extra.conf if you prefer the command line):

[Global]
   min protocol = SMB2
   ea support = yes
   vfs objects = catia fruit streams_xattr
   fruit:aapl = yes
   fruit:nfs_aces = no
   fruit:zero_file_id = yes
   fruit:metadata = stream
   fruit:encoding = native
   fruit:model = MacSamba
   veto files = /._*/.DS_Store/
   delete veto files = yes

[Backups]
   path = /mnt/user/Backups
   fruit:time machine = yes
   fruit:time machine max size = 3 T

 

In my case I used a maximum size of 3TB for the Time Machine backups. A nice extra with this configuration: a faster browsing experience of SMB shares in macOS (at least in Finder).

 

Note of caution: if you use the Unassigned Devices plugin, the above configuration needs to be included before '#unassigned_devices_start'.

 

Finally, for the Backups share, the specific SMB settings:

111940284_CleanShot2022-01-12at15_28.00@2x.thumb.png.e1f91f516ccc435524c0941a13ff099a.png

 

The Time Machine volume size limit (3TB in MB) here is probably useless as it is overridden by the SMB Extras settings.

 

Hope it helps some of you.

 

Edited by Kaj
As @rctneil pointed out, the veto parameter can be declared in de Global section. Cleaned the config.
Link to comment

@Kaj Many thanks for sharing your setup.   I may try exactly this when my new MacBook Pro arrives in 2 weeks.

 

Just in aid of clarification, you have <ShareName>, is this a scenario where we change those to be our own share names or is that literally meant to be left as <ShareName> and effectively work for all other shares without explicitly specifying a name?

Link to comment

@rctneil Yes, <ShareName> is a placeholder for your own shares. You'll have to explicitly specify each and everyone of them. For example:

[appdata]
   path = /mnt/user/appdata
   veto files = /._*/.DS_Store/
   delete veto files = yes

 

The Time Machine backup is successfully finished so it seems to be working :D

Edited by Kaj
The backup is ready :-)
Link to comment
  • 4 weeks later...
  • 5 months later...
  • 2 weeks later...
  • 4 months later...
On 8/4/2022 at 12:18 PM, SpencerJ said:

A brand new @SpaceInvaderOne video for 2022 is now live! 

 

 

https://unraid.net/mac-backups


Thank you for sharing this. I noticed this video & the Unraid guide ask us to put Time Machine on one drive only. 
 

Is this something that might become more flexible in the future so that we could allow larger macOS backups to be spread onto more drives?


Or it’s a more technical limitation why TM backups are one-drive-only?

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.