It turns out there is a fairly good guide for this at Ultimate Guide to Configuring Samba for Time Machine Backups on Debian Servers. However, it is missing one critical step. One also needs ea support = yes in the [Global] section. Once I added that, the following configuration works:
[Global]
...
# MacOS compatibility
ea support = yes
security = user
wide links = yes
unix extensions = no
vfs object = acl_xattr catia fruit streams_xattr
fruit:nfc_aces = no
fruit:aapl = yes
fruit:model = MacSamba
fruit:posix_rename = yes
fruit:metadata = stream
fruit:delete_empty_adfiles = yes
fruit:veto_appledouble = no
spotlight = yes
[TIMEMACHINEBACKUPS]
comment = Time Machine Backups
path = /tmbackups
available = yes
writable = yes
guest ok = no
valid users = samba
browsable = yes
vfs objects = catia fruit streams_xattr
fruit:time machine = yes
fruit:time machine max size = 9T
Of course, modify path and max size to your setup and share name and user as desired.
Answer from Peter N. Steinmetz on serverfault.comI’ve been reading many helpful guides out there but I’ve struggled to find one that’s a) recent, as in less than a year old; and b) written in a way that a 5 year old might understand.
What’s I’m after is people’s recommendations, and a fairly simple set of instructions to help me use my Homelab (a Ubuntu PC) as a target for macOS Time Machine backups.
My setup:
-
repurposed 2014 Mac Mini running Ubuntu 24.04.1 LTS (this will be the target server)
-
a 2 or 4TB USB 3.1 HDD (not yet purchased: this will be the target drive)
-
an M1 iMac running the latest macOS
-
an eero wireless network (which I plan to add wired backhaul to in the future)
Simply put, I want to add the HDD to the old Mac Mini running Ubuntu, and choose that HDD as the Time Machine destination.
Any recommendations on HDD drives?
Any helpful instructions on what settings / commands I need to run on the Linux PC so that the drive is exposed to macOS as a Time Machine destination?
Your help’s appreciated.
Videos
I've used rsnapshot to excellent effect. You can have it rsync and keep as many old versions, based on time as you want/have space for. I've got 6 potential versions of things from today, daily for a week, 4 weeks, and then 6 months worth. I've already used it to recover several file I thought I'd lost due to overwriting.
The only problems I have had was it not running due to the previous run not completing in time, and so it left the lockfile dangling. This was on a remote machine that did password-less logins over SSH to rsync files off for backup/archive and I didn't log in very often to the server to check it. Running a logwatch script on there (emailing problems from the logs) at least made sure I saw the problems to restart it, and it's been hassle free ever since. On my local server, it's been no problem at all.
You may want to try Back In Time
Disclaimer: Complete noob to the world of home labs and servers here.
Goal: backup two Macs to a Linux server using Time Machine + file sharing in home network.
My post is here to basically ask if my goal is feasible for a noob, and if so, if you guys have any tips on where to start. This is the post that inspired me: https://alexlubbock.com/time-machine-network-backup-linux
In terms of equipment, I'm thinking of getting a NUC and add 16GB RAM and 1 TB SSD (or should I go 2TB?) and installing Ubuntu Server.
There are probably other things I should be considering but that I'm not aware of yet.