[How-To] Set up Time Machine for multiple machines with OSX Server-Style Quotas

Stux

MVP
Joined
Jun 2, 2016
Messages
4,367
Hope so! The target version seems to be repeatedly getting pushed out...

Yes. Maybe you should second the feature request ;)
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,367
This might sound quite dumb, but I'm very new here (actually, to forums generally) so can you please tell me how to!

You need to create an account on the bug tracker, then you can reply to the bug
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,367
I just reconfirmed this method on macos 10.12 Sierra,

So, on macos 10.12 Sierra, the following command will output the TM log

log show --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info

And this command will stream it, much like tail

log stream --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info

Doing that when my Time Machine backup is running to a FreeNAS AFP share, with the documented above quota method I see this

Code:
2017-11-15 11:27:07.946018+1100  localhost backupd[1817]: (TimeMachine) [com.apple.TimeMachine.TMLogInfo] Quota in effect for '/Volumes/Titan Time Machine': 4 TB (4,000,000,000,000 bytes)


When my TM backup process starts, which is what I have the quota set to.

--

Next step, check High Sierra :)
 

norbs

Explorer
Joined
Mar 26, 2013
Messages
91
Thanks for this, I've tried to set up TM on FreeNAS many times in the past and just gave up each time. This appears to be working flawlessly so far.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,367
This functionality has now been included in FreeNAS 11.1 :)
 

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
Question about this. Under 11.1 I now have the following files:

Code:
-rw-r--r--  1 timemachine  wheel  225 Dec 31 13:03 .com.apple.TimeMachine.quota.plist
-rw-r--r--  1 timemachine  wheel	0 Dec 31 13:03 .com.apple.TimeMachine.quota.plist.FreeNAS-managed
-rw-r--r--  1 timemachine  wheel	0 Dec 31 13:03 .com.apple.timemachine.supported


As you can see, the FreeNAS-managed version of the file is empty. Since I updated from 9.10, what is the best way to make sure the new quote option in FreeNAS 11 is utilized?

Thanks,
 

rogerh

Guru
Joined
Apr 18, 2014
Messages
1,111
Question about this. Under 11.1 I now have the following files:

Code:
-rw-r--r--  1 timemachine  wheel  225 Dec 31 13:03 .com.apple.TimeMachine.quota.plist
-rw-r--r--  1 timemachine  wheel	0 Dec 31 13:03 .com.apple.TimeMachine.quota.plist.FreeNAS-managed
-rw-r--r--  1 timemachine  wheel	0 Dec 31 13:03 .com.apple.timemachine.supported


As you can see, the FreeNAS-managed version of the file is empty. Since I updated from 9.10, what is the best way to make sure the new quote option in FreeNAS 11 is utilized?

Thanks,
Have you set a quota in the GUI, under Sharing/Apple(AFP)/<sharename>? If you set it as a TimeMachine share there is a box to enter a number which is treated as a number of GiB.

If you have done that, then it should just work. And what I can confirm is that the result of ls -l in my share dataset is exactly the same as yours and the quota I have set is in the 225Byte .plist file. The fact that one of the files is described as "FreeNAS-managed" does not mean that this is the one FreeNAS has put the data in, it is presumably just an indicator, like a lock file.

This is the content of my .plist file, where 524288000 is my chosen 500GiB quota:

Code:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>GlobalQuota</key>
		<integer>524288000</integer>
	</dict>
</plist>
 

Scharbag

Guru
Joined
Feb 1, 2012
Messages
620
Have you set a quota in the GUI, under Sharing/Apple(AFP)/<sharename>? If you set it as a TimeMachine share there is a box to enter a number which is treated as a number of GiB.

If you have done that, then it should just work. And what I can confirm is that the result of ls -l in my share dataset is exactly the same as yours and the quota I have set is in the 225Byte .plist file. The fact that one of the files is described as "FreeNAS-managed" does not mean that this is the one FreeNAS has put the data in, it is presumably just an indicator, like a lock file.

This is the content of my .plist file, where 524288000 is my chosen 500GiB quota:

Code:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>GlobalQuota</key>
		<integer>524288000</integer>
	</dict>
</plist>
You are correct, it just works, as my .plist shows some random number for 1TB that I do not remember typing in like that.

Code:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>GlobalQuota</key>
		<integer>1048576000</integer>
	</dict>
</plist>


Cheers,
 

SlackerDude

Explorer
Joined
Feb 1, 2014
Messages
76
[QUOTE
Code:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>GlobalQuota</key>
		<integer>524288000</integer>
	</dict>
</plist>
[/QUOTE]

Not on topic perhaps, but interesting to note that 524288000 kilobits *is* 500GB.
 
Last edited:

SlackerDude

Explorer
Joined
Feb 1, 2014
Messages
76
You are correct, it just works, as my .plist shows some random number for 1TB that I do not remember typing in like that.

Code:
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
	<dict>
		<key>GlobalQuota</key>
		<integer>1048576000</integer>
	</dict>
</plist>


Also interesting is in this plist, 1048576000 kilobytes = 0.9765625 TB... not exact. Both based on the "kilo is 1024" notation.
 
Joined
Apr 2, 2018
Messages
6
This functionality has now been included in FreeNAS 11.1 :)

Hi Stux,
should I just set the quota for Time Machine under Sharing --> Apple(AFP) --> share_name
or add also a ZFS quota too Storage --> Volumes ?

Thanks
 

JDLH

Dabbler
Joined
Aug 10, 2019
Messages
22
At the top of this thread, there is an Enhancement Request link https://bugs.freenas.org/issues/17875 . When I follow that link, I arrive at a different domain name, https://jira.ixsystems.com/ , with different issue numbers in a different format, e.g. NAS-100122 . Searching from there, I can't find this enhancement request. Is there a link to this Enhancement Request which is working as of August 2019?
 

KevDog

Patron
Joined
Nov 26, 2016
Messages
462
I hate to reopen this thread.

Now on MacCatalina.

Following command and output:

Code:
root@freenas:/mnt/tank/TimeMachine # log show --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info
log: Too many arguments
 

fillg1

Dabbler
Joined
Dec 14, 2014
Messages
34
The correct search term for the quoa in Mojave seems to be
Code:
log stream --style syslog --predicate 'senderImagePath contains[cd] "TimeMachine"' --info | grep "size limit"


....size limit is 432,12 GB (432.123.456.789 Byte)
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,367
This functionality applies to AFP style Time Machines, and the functionality was added to the FreeNAS GUI in 11.1

For modern Macos, and with TrueNAS 12, you should be using an SMB Time Machine, and rather than having a single dataset, which is shared via AFP, you instead create another dataset, and then you share that via SMB with the multi-user timemachine preset.

Then you create a new user on your TrueNAS for each mac you wish to backup (for example user-mbp, user-imac etc)

Then you should be able to add the SMB timemachine as a disk to a given macs timemachine, login when prompted with the specific device user/password.

TrueNAS will then create a dataset for that user and that will contain the backup.

In the GUI you can then set a quota for that new dataset.

I generally allow 2x the physical disk size for time machine backups.

It seems to work quite well, and the "legacy" time machine can still be used for legacy macos devices which don't support SMB timemachine.
 

Constantin

Vampire Pig
Joined
May 19, 2017
Messages
1,828
FWIW, I don't find the quota process as straightforward as it ought to be. Time machine seems quite finicky re: what quotas it recognizes as disk limits (which would trigger TM recycling the oldest bands that have been changed since inception) rather than causing a disk error and stopping the TM operation from concluding. What I thought would be a straightforward approach for my wifes Mac ended up with a TM reporting that it couldn't back up for a very long time.
 
Top