Fix/Clean up Apple Time Machine Support

I have just spent the last 2 days trying to setup an external USB drive to be used as a Time Machine drive so that I don’t want to waste space my main SSD storage pool.

Over the course of the 2 days I, along with Claude, battled our way through so many steps to make it work - which it can do!
4 of the 6 issues we eventually worked were all to do with how QTS (5.2.9) is setup and could be corrected so other users don’t have to spend so much time failing to get this to work. Some of these decisions are possibly by design(?) where as others are just missing simple configuration lines.

Bug 1: Microsoft Networking not granted by default blocks SMB auth for non-admin users
Bug 2: Bonjour Time Machine advertisement claims AFP support when AFP is disabled
Bug 3: Time Machine-advertised share is missing the vfs_fruit directives macOS requires
Bug 4: External-drive shares default to oplocks = no, which breaks durable handles

I had Claude write a full report I am happy to share but here is the summary of fixes that would make everyones life easier using TimeMachine -

| | Full Report/Extended Info Here | |
|----|

Bug #1

Location User creation subsystem

Grant Microsoft Networking by default, or surface a clear warning if unchecked.

Bug #2

Location /etc/avahi/services/timemachine.service (generator)

Emit adVF=0x82 when AFP is disabled; add sys=waMa=0,adVF=0x100 TXT record.

Bug #3

Location smb.conf generation for TM shares

When timemachine=yes is set, emit vfs objects = fruit streams_xattr plus fruit:time machine / fruit:aapl / fruit:metadata directives.

Bug #4

Location smb.conf generation for external-drive shares

Default oplocks = yes instead of no; expose as user-configurable setting if the external-drive-safety rationale still applies.

I did not see a specific feature requested, but a bunch of AI generated ‘bugs’, so I moved that post to a better fitting location

Well I could have human re-wrote it but fundamentally there are 4 distinct things that are missing or broken with Time Machine backups on QTS. I spent two days (as a human) getting my USB hard drive to backup and discovered these bugs as all break Time Machine backups to us humans. My feature request is pretty simple - make it work so a user can easily setup TimeMachine backups to their expensive NAS. Ideally support external drives too.

“Make it work” is not a feature request, it’s a busted existing function. So it’s a bug report.

Fair enough - but it certainly skirts the ‘this feature [request] to be able to write to external drives’ and ‘the feature doesn’t even work’ - I just hope that someone at QNAP see’s this and spends the few hours of fixing a few lines of code to be able to say ‘Time Machine support’ with a straight face.

First of all, I am not sure why you would not want TimeMachine data on the NAS where you should have a RAID configuration to help with data integrity. I know you said you don’t want to “waste” space only our storage pool but…

Isn’t the purpose of the NAS to backup your equipment?

You likely have a RAID set up on your NAS which helps with data integrity but you have instead trusted backing up your Mac to an external hard drive which has no data redundancy protection. Is your valuable Mac data not that important?

How much storage space do you have on your NAS? I’m guessing your Mac is a fraction of that space. So you really are not “wasting” much space to keep the TM backups right on the NAS.

Then backup the TM folder on the NAS to your external hard drive. Now you have a backup off your backups…

Thanks for your suggestion and feedback! I’ll check with our internal team to confirm the related issues and details.

Cool story NA9D. This QNAP is my very off site (1400km/869 freedom miles away) backup - it’s the backup, of my backup, of my backup. The QNAP is a 8 bay 2.5" all populated with EVO SSDs so the actual size is limited (8tb RAID 0) which in itself needs a permanent on going backup to an external HDD drive due to RAID 0… do you see the problem? Wasting 25% of that space for a Time Machine backup is crazy talk.

The two days problem solving was to understand and fix this issue as why can’t I just plug in an external drive and set QTS to backup to that drive my mothers backup of her 2tb MB Air as the NAS is sitting in her cupboard and she has no idea what it does other than flash lights…