Is TrueNAS Scale working as timemachine?

vega2004

Dabbler
Joined
Apr 18, 2021
Messages
19
I tried to create a SMB share with timemachine active and a seperate user as owner. Acl-mode is discard.
I using TrueNAS-SCALE-21.06-MASTER-20210619-092919
I receive from MacOSX 11.4 after selecting the share the error: You do not have the necessary read, write and append privileges on the selected network backup disk

Is the feature already available in TrueNAS Scale?
 

jjstecchino

Contributor
Joined
May 29, 2011
Messages
136
I tried to create a SMB share with timemachine active and a seperate user as owner. Acl-mode is discard.
I using TrueNAS-SCALE-21.06-MASTER-20210619-092919
I receive from MacOSX 11.4 after selecting the share the error: You do not have the necessary read, write and append privileges on the selected network backup disk

Is the feature already available in TrueNAS Scale?
It works for me.

I created a user on scale with the same user name and password as my osx user. Do not think it is necessary to use the same name but it is cleaner. Then create a "timemachine" group and use it for the time machine users. Then created a dataset to hold the time machine backups. Then created a time machine share on that dataset and set ACL for the timemachine group to have read, right and execute permission.

On the mac I can see and select the time machine share. I do have to enter user name and password and time machine works like a charm.

of note, I have multiple users on that share and I have a child dataset on the time machine main dataset for each user.
 

vega2004

Dabbler
Joined
Apr 18, 2021
Messages
19
Strange maybe you can check your options if you see a different
 

Attachments

  • dataset.png
    dataset.png
    138 KB · Views: 1,355
  • user.png
    user.png
    169.6 KB · Views: 1,434
  • smbshare.png
    smbshare.png
    200.3 KB · Views: 1,210
  • datasetpermis.png
    datasetpermis.png
    381 KB · Views: 1,120
  • datasetp.png
    datasetp.png
    478.5 KB · Views: 1,420

vega2004

Dabbler
Joined
Apr 18, 2021
Messages
19
I solved the problem for me to set the chmod of the folder manually I think it is the wrong way but I have to figure out what the problem is
 

c77dk

Patron
Joined
Nov 27, 2019
Messages
468
I think it's ok to create a SMB share with "Legacy AFP Compatibility" only for time machine backup.
You might want to listen to what @anodos writes - if anyone knows the SMB code I would say it's him (he's the one primarily writing the stuff in TrueNAS) :smile:
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
I think it's ok to create a SMB share with "Legacy AFP Compatibility" only for time machine backup.
The help text says it all:

This controls how the SMB share reads and writes data. Leave unset for the share to behave like a normal SMB share and set for the share to behave like the deprecated Apple Filing Protocol (AFP). This should only be set when this share originated as an AFP sharing configuration. This is not required for pure SMB shares or MacOS SMB clients.
That said, once you configure a share this way, you must not change it. Ever. It impacts how on-disk xattrs are written.
My request was limited to not telling other users to make this configuration change.
 

majinjing3

Dabbler
Joined
Sep 2, 2021
Messages
19
The help text says it all:


That said, once you configure a share this way, you must not change it. Ever. It impacts how on-disk xattrs are written.
My request was limited to not telling other users to make this configuration change.

Thanks for the details.

I just want to select the smb shares in time machine page. Only with "Legacy AFP Compatibility" option, I can find it.
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,553
Thanks for the details.

I just want to select the smb shares in time machine page. Only with "Legacy AFP Compatibility" option, I can find it.
That isn't required for visibility. Double-check that you have apple extensions enabled under Services->SMB. Visibility in Finder / Time Machine menu depends on mDNS (not directly related to SMB protocol configuration).
 

majinjing3

Dabbler
Joined
Sep 2, 2021
Messages
19
That isn't required for visibility. Double-check that you have apple extensions enabled under Services->SMB. Visibility in Finder / Time Machine menu depends on mDNS (not directly related to SMB protocol configuration).

Thanks.

I have found that "avahi-daemon" is inactive. After start it and restart smb, I can find the smb share in Time Machine.
 

JMY1000

Dabbler
Joined
Feb 24, 2022
Messages
16
Facing a similar issue here, but haven't gotten it to work yet. The volume doesn't show up in the Time Machine preference pane, and doing it through the command line gives the following error:
Disk does not support Time Machine backups. (error 45) The backup destination could not be set.

I've verified that the "Enable Apple SMB2/3 Protocol Extensions" option is selected for the SMB service, and that the avahi-daemon is running.
 

Codes

Cadet
Joined
Feb 24, 2022
Messages
2
I banged my head on it for a long time, There's something wrong with the avahi-daemon in RC2 and Release where it doesn't start advertizing after being started in the same configuration as it had when shut down. There's also something that's restarting the avahi-daemon after SMB and adisk have been setup in the avahi-config, so that triggers the bug in avahi-daemon.

Anyhow, I worked around it by popping into the shell and moving one of the services so avahi-daemon picked up the change, and then moving it back so the TrueNAS Middleware doesn't loose control over it.
mv /etc/avahi/services/SMB.service /etc/avahi/services/SMB2.service mv /etc/avahi/services/SMB2.service /etc/avahi/services/SMB.service

I'm not sure if you have to do this after every reboot, I hope not! But this is probably safe enough to put into the startup scripts if they execute after avahi has started
 

JMY1000

Dabbler
Joined
Feb 24, 2022
Messages
16
I banged my head on it for a long time, There's something wrong with the avahi-daemon in RC2 and Release where it doesn't start advertizing after being started in the same configuration as it had when shut down. There's also something that's restarting the avahi-daemon after SMB and adisk have been setup in the avahi-config, so that triggers the bug in avahi-daemon.

Anyhow, I worked around it by popping into the shell and moving one of the services so avahi-daemon picked up the change, and then moving it back so the TrueNAS Middleware doesn't loose control over it.
mv /etc/avahi/services/SMB.service /etc/avahi/services/SMB2.service mv /etc/avahi/services/SMB2.service /etc/avahi/services/SMB.service

I'm not sure if you have to do this after every reboot, I hope not! But this is probably safe enough to put into the startup scripts if they execute after avahi has started
Hm, I wasn't able to get this to work. You're able to get it to work just by moving it and moving it back after booting?
 

ksimm1

Dabbler
Joined
Dec 7, 2020
Messages
42
I banged my head on it for a long time, There's something wrong with the avahi-daemon in RC2 and Release where it doesn't start advertizing after being started in the same configuration as it had when shut down. There's also something that's restarting the avahi-daemon after SMB and adisk have been setup in the avahi-config, so that triggers the bug in avahi-daemon.

Anyhow, I worked around it by popping into the shell and moving one of the services so avahi-daemon picked up the change, and then moving it back so the TrueNAS Middleware doesn't loose control over it.
mv /etc/avahi/services/SMB.service /etc/avahi/services/SMB2.service mv /etc/avahi/services/SMB2.service /etc/avahi/services/SMB.service

I'm not sure if you have to do this after every reboot, I hope not! But this is probably safe enough to put into the startup scripts if they execute after avahi has started

If you can reproduce this, please file a bug report to iX and attach your debug. I have been trying get it resolved with tickets over multiple SCALE versions without much luck.
 

c77dk

Patron
Joined
Nov 27, 2019
Messages
468
Got TM running perfectly - this dataset and setup has been with me since RC2
 

c77dk

Patron
Joined
Nov 27, 2019
Messages
468
What settings did you have to change from stock?
Nothing really.

Chose "Multi-user time machine" preset

and now the settings are:
"Enable ACL"
"Browsable to Network Clients"
"Time Machine"
"Enable Shadow Copies"
"Enable Alternate Data Streams"
"Enable SMB2/3 Durable Handles"
 

JMY1000

Dabbler
Joined
Feb 24, 2022
Messages
16
Nothing really.

Chose "Multi-user time machine" preset

and now the settings are:
"Enable ACL"
"Browsable to Network Clients"
"Time Machine"
"Enable Shadow Copies"
"Enable Alternate Data Streams"
"Enable SMB2/3 Durable Handles"
Cool, I was able to get things to show up as a valid Time Machine target after adding a separate dataset for Time Machine. Unfortunately when I connect to the new share, I'm seeing a significantly less free space than expected, which is preventing me from backing up.

1646354506194.png

1646354522689.png

I've verified that no quotas are enabled for the dataset; the main share still shows the correct amount of data, it's just the new share that's wrong.
 
Top