Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Time Machine on TrueNas

andrema2

Member
Joined
Aug 3, 2011
Messages
53
Hi,

I've been using Time Machine for many years on FreeNas. It migrated to TrueNas without much problem. Today, for other reasons, I had to create a new pool and a new share for my Macs Time Machine backups.

I the past I used to create just one share and point all machines to that share. Each of those machines would create their sparsebundle and more recently I saw it have created a dataset.

Today, I wasn't able to create just one share and let the Macs do their thing. I have 3 machines, two High Sierras and one Catalina. The Catalina one was the first and was able to use the share and create it's dataset without me needing to do anything else. For the High Sierras it was not the case. It refused to connect, with permissions errors (that's my understanding). I had to create a dataset and a TM share for each machine and give the right permissions to be able to make it work.

Is it by default/design ? Is it possible to have just one share for all Machines ?

Thanks in advance
 

andrema2

Member
Joined
Aug 3, 2011
Messages
53
Since yesterday, the Mac that was able to create its own dataset (catalina OS) had to recreate the first back 3 times. The error message was "To improve reliability, Time Machine must create a new backup for you."

I've now created a share for this dataset and added
Code:
vfs objects=aio_fbsd tmprotect fruit streams_xattr shadow_copy_zfs ixnas
in the auxiliary option. Do you think it's ok now ?
 

JaimieV

Neophyte Sage
Joined
Oct 12, 2012
Messages
736
I have just one share for all Macs, with a 4TB quota, and they seem to be happy with it. I get a "to improve reliability" once or twice a year across three Macs, and I just revert to an older snapshot of the TM dataset until it stops happening, ie before whatever corruption set in.

On first connection the TM System Prefs will ask for the username/pass necessary. I give them all the same user, the timemachine user that I created and set ACLs for the TM share for.

My TM shares have only the default vfs objects, ixnas streams_xattr

(When changing things, I have once had to go in to Keychain Access.app (/Applications/Utilities) and delete the saved login for the share, else the Mac is caching the old creds - it says "username or password incorrect" in this case but doesn't give you a way to correct it, thanks Apple)
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
6,742
Since yesterday, the Mac that was able to create its own dataset (catalina OS) had to recreate the first back 3 times. The error message was "To improve reliability, Time Machine must create a new backup for you."

I've now created a share for this dataset and added
Code:
vfs objects=aio_fbsd tmprotect fruit streams_xattr shadow_copy_zfs ixnas
in the auxiliary option. Do you think it's ok now ?
Can you PM me a debug from your server?
 

andrema2

Member
Joined
Aug 3, 2011
Messages
53
Can you PM me a debug from your server?
I just deleted everything and I'm trying to create it from the scratch. I didn't find a guide to do it on TrueNas 12.
I have 4 different Macs 2 with HIgh Sierra, 1 Catalina and 1 BigSur.
Let's see if I can make it and I'll let you know.

If there was a guide it would be perfect
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
6,742
I just deleted everything and I'm trying to create it from the scratch. I didn't find a guide to do it on TrueNas 12.
I have 4 different Macs 2 with HIgh Sierra, 1 Catalina and 1 BigSur.
Let's see if I can make it and I'll let you know.

If there was a guide it would be perfect
Create separate local user accounts for each of the Macs. Create a single time machine share with "enhanced time machine backup" preset. Use credentials and target for backups.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
6,742
This will automatically create datasets for each of the users when the macs first authenticate, and take snapshots of the dataset during clean disconnect so that you can rollback to previous versions of the sparsebundle volume on a per-mac basis in case it gets corrupted.
 

andrema2

Member
Joined
Aug 3, 2011
Messages
53
Here my testparm -s
Code:
Load smb config files from /usr/local/etc/smb4.conf
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
    aio max threads = 2
    bind interfaces only = Yes
    disable spoolss = Yes
    dns proxy = No
    enable web service discovery = Yes
    interfaces = 127.0.0.1 10.2.2.2
    kernel change notify = No
    load printers = No
    logging = file
    max log size = 51200
    netbios aliases = freenas
    nsupdate command = /usr/local/bin/samba-nsupdate -g
    registry shares = Yes
    restrict anonymous = 2
    server role = standalone server
    server string = FreeNAS Server
    unix extensions = No
    idmap config *: range = 90000001-100000000
    fruit:nfs_aces = No
    idmap config * : backend = tdb
    directory name cache size = 0
    dos filemode = Yes
    strict sync = No


[NAS]
    ea support = No
    kernel share modes = No
    path = /mnt/NAS
    posix locking = No
    read only = No
    vfs objects = aio_fbsd fruit streams_xattr shadow_copy_zfs ixnas
    fruit:resource = stream
    fruit:metadata = stream
    nfs4:chown = true


[TM]
    ea support = No
    kernel share modes = No
    path = /mnt/TM/%U
    posix locking = No
    read only = No
    vfs objects = aio_fbsd tmprotect fruit streams_xattr shadow_copy_zfs ixnas
    ixnas:default_user_quota = 1T
    ixnas:zfs_auto_homedir = true
    fruit:locking = none
    fruit:time machine = yes
    fruit:resource = stream
    fruit:metadata = stream
    nfs4:chown = true


I just sent you in the PM the debug
 

andrema2

Member
Joined
Aug 3, 2011
Messages
53
This will automatically create datasets for each of the users when the macs first authenticate, and take snapshots of the dataset during clean disconnect so that you can rollback to previous versions of the sparsebundle volume on a per-mac basis in case it gets corrupted.
Ok. Destroing what I did, that it's different and creating a new one as you suggested
 

andrema2

Member
Joined
Aug 3, 2011
Messages
53
Create separate local user accounts for each of the Macs. Create a single time machine share with "enhanced time machine backup" preset. Use credentials and target for backups.
I don't have an "enhanced time machine backup" preset. I have a Multiuser Time Machine. Is it the same ? I'm missing something ?
 

andrema2

Member
Joined
Aug 3, 2011
Messages
53
I created a share with Multi User Time Machine preset.

I've started the TM on all four machines. This is what I see at the Pool

Screen Shot 2020-10-23 at 15.49.53.jpg

TM is the share. Andre is my user, no machine is connecting to the TM share as Andre, but they connect to other shares at the same server using this user. The four datasets below the Andre dataset belongs to each machine. Strangely, to me at least, the data seems to be save on the first dataset only. I believe it might be causing the issues.
 

dak180

Member
Joined
Nov 22, 2017
Messages
112
This will automatically create datasets for each of the users when the macs first authenticate, and take snapshots of the dataset during clean disconnect so that you can rollback to previous versions of the sparsebundle volume on a per-mac basis in case it gets corrupted.
What is the best way to set this up on an existing share/dataset that predates 12?
 

andrema2

Member
Joined
Aug 3, 2011
Messages
53
I still have issues with my Time Machine. Every time that TrueNas restarts, TM shares are not visible to the Macs. I can use the other SMB shares but not the TM SMB share. I have to stop and start the SMB service for it make the share visible again.

Has anyone facing it too ?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
6,742
I still have issues with my Time Machine. Every time that TrueNas restarts, TM shares are not visible to the Macs. I can use the other SMB shares but not the TM SMB share. I have to stop and start the SMB service for it make the share visible again.

Has anyone facing it too ?
Known issue on some servers (race condition with avahi config generation). You can add an post-init script to restart mdns "midclt call service.restart mdns" or wait for the U1 update.
 
Top