I have a 27" iMac (2020) and want to back it up with Time Machine. Recently I set up a NAS using a Raspberry Pi 4 and a 6TB WD Elements External HDD. Now I want to use this NAS as a Backup Server with Time Machine.
If I remember correctly, you create a TimeMachine Sparsebundle, mount it and set it as destination using "tmutil" in the Terminal. But every time I have done this, after a Week it would say to me that it needs to create a new Backup to enhance reliability or something.
So, my question is what I am doing wrong and if there is any way to prevent the Backup from corrupting?
Is there a proper way to backup macOS via Time Machine to a network SMB share? I prefer to use a Windows share. If it's not possible, which OS would support Time Machine backup to a network SMB share?
Thank you.
EDIT I think I should clarify the things I have. So I have 1 Mac Mini with about 230GB used that's currently running Mojave that has APFS. I don't want to purchase additional hardware, because the hyperconverged 3-node cluster that I have has 40TB of usable space (about 1/3 of that space is used right now). With this hypercoverged 3-node cluster, I could use any Windows and Linux OS's. We set up data protection and it has its own node failover. I have a backup solution for this cluster as well. So basically, I would be backing up the Mac Mini on to a VM and then backing up the VM on to a backup drive.
I've set up the sparse bundle image and successfully backed it up via Time Machine on a Windows SMB share. Unfortunately, I was not able to restore the backup to a different Mac device that I'm testing right now.
I would like to know if there's an easier way to backup the Mac Mini without purchasing additional hardware.
Thanks again.
you can also use a synology device: https://www.synology.com/en-uk/knowledgebase/DSM/tutorial/Backup_Restore/How_to_back_up_files_from_Mac_to_Synology_NAS_with_Time_Machine
I spent a lot of time working on this. Basically, nope. I ended up with a virtual ubuntu box running netatalk (on hyper-v), but the share was still AFP. Scaled nicely with users, worked with quotas and AD. I've been told later version of time machine can use SMB shares (i did this 3 years ago) but haven't tested it myself. Reliability is the key. I've had marginal successes with SMB 3.0, but lots of failures where the entire backup needed to be redone. every month. which defeats the purpose of time machine, which is to allow time travel.
Videos
Hello,
I've been hosting a Time Machine share on my local samba server for almost a year, which I have configured to work with TimeMachine according to this https://mklasen.com/timemachine-with-samba-on-an-ubuntu-server/ which was working great until I've upgraded to 13.2.
I had it set up to backup every week since 13.0 came out and today morning I've noticed that it didn't create a backup. After trying to manually create it was endlessly trying to connect.
To see if the samba is working I've tried to connect from my linux pc with the same credentials and I could browse / create/ delete files, so samba seems to be working correctly.
I haven't messed with any of the samba settings or the server itself.
Has anyone stumbled upon similliar issues on Macos? Maybe with 13.2 I have to set up timemachine share differently? Maybe there are some new options that I need to change on my mac for it to work as before?
Thanks for Your help!
I just set up SMB on my Linux NAS. I can mount the share in Finder, but in Time Machine it doesn't show up in the list of backup disks. On this page it says:
Note: Some network disks from manufacturers other than Apple don’t support Time Machine. If the disk doesn’t appear in the list of devices available for Time Machine backups, contact the disk’s manufacturer.
Obviously my hard drive manufacturer won't know how to fix this; it seems to be a problem with the SMB configuration. Has anyone gotten Time Machine working with a DIY NAS? Any idea what I might try? My current smb.conf is this:
[global] browseable = yes workgroup = WORKGROUP server string = Samba Server server role = standalone server [homes] browseable = no writable = yes
FWIW I asked on IRC and the consensus seemed to be that TM is too unreliable when connecting to non-Apple NASs, and I should just use rsync or some other 3rd party tool. Decided to post here for a second opinion, but if anyone has suggestions for the easiest way for my mom to back up her MacBook to my NAS, let me know.
Hi,
I just wanted to share my experience with the new vfs_fruit extension in samba 4.8
I've got three macbooks at home and want them to have time machine backups. The current way to go is a netatalk implementation, but it is horrible slow and buggy. But with the new vfs_fruit extension in samba 4.8 it works awesomely fine.
This copy+paste howto is just to get it running with some lazy workarounds and a little bit of documentation. Tested with Ubuntu 16.04
Some notes:
-
Samba 4.8 will not be in Ubuntu 18.04.
-
Currently Samba 4.8 is available as RC.
-
Release is currently planned for tomorrow, maybe (https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.8)
-
Ensure you create encrypted backups
-
Tested with high sierra. Feel free to test it with other osx versions.
-
You can even make a full restore when you got a new macbook.
-
Don't blame me for anything. I am not even good at this stuff.
-
Feel free to message me with more input
-
I have very limited time to use reddit, so please be patient when I don't answer directly
Avahia:
apt -y install avahi-daemon
cat <<< _EOF_ > /etc/avahi/services/timemachine.service <?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_smb._tcp</type> <port>445</port> </service> <service> <type>_device-info._tcp</type> <port>0</port> <txt-record>model=RackMac</txt-record> </service> <service> <type>_adisk._tcp</type> <txt-record>sys=waMa=0,adVF=0x100</txt-record> <txt-record>dk0=adVN=TimeMachine Home,adVF=0x82</txt-record> </service> </service-group> _EOF_
There is the line <txt-record>dk0=adVN=TimeMachine Home,adVF=0x82</txt-record> where TimeMachine Home is the name your mac will display (https://imgur.com/a/iezWt).
Samba 4.8
prerequisites
apt -y install install acl attr autoconf bind9utils bison build-essential \ debhelper dnsutils docbook-xml docbook-xsl flex gdb libjansson-dev krb5-user \ libacl1-dev libaio-dev libarchive-dev libattr1-dev libblkid-dev libbsd-dev \ libcap-dev libcups2-dev libgnutls28-dev libgpgme11-dev libjson-perl \ libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl \ libpopt-dev libreadline-dev nettle-dev perl perl-modules pkg-config \ python-all-dev python-crypto python-dbg python-dev python-dnspython \ python3-dnspython python-gpgme python3-gpgme python-markdown python3-markdown \ python3-dev xsltproc zlib1g-dev
compiling
Get the current RC here: https://download.samba.org/pub/samba/rc/
wget https://download.samba.org/pub/samba/rc/samba-4.8.0rc4.tar.gz; tar -xzf samba-4.8.0rc4.tar.gz; cd samba-4.8.0rc4
./configure --with-systemd --systemd-install-services --with-systemddir=/lib/systemd/system \ --sysconfdir=/etc/samba --jobs=`nproc --all` make --jobs=`nproc --all` && make install
This will install samba to /usr/local/samba, puts configs under /etc/samba and installs the systemd services to /lib/systemd/system and it will use all your cpu cores for compiling.
Adjusting start scipt
sed -i 's/Type=notify/Type=simple/g' /lib/systemd/system/smb.service
Fixed some issues while starting the service.
configure samba
/etc/samba/smb.conf [global] # Basic Samba configuration server role = standalone server passdb backend = tdbsam obey pam restrictions = yes security = user printcap name = /dev/null load printers = no socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=524288 SO_SNDBUF=524288 server string = Samba Server %v map to guest = bad user dns proxy = no wide links = yes follow symlinks = yes unix extensions = no acl allow execute always = yes log file = /var/log/samba/%m.log max log size = 1000 # Special configuration for Apple's Time Machine fruit:model = MacPro fruit:advertise_fullsync = true fruit:aapl = yes ## Definde your shares here [TimeMachine Home] path = /srv/backup/timemachine/%U valid users = %U writable = yes durable handles = yes kernel oplocks = no kernel share modes = no posix locking = no vfs objects = catia fruit streams_xattr ea support = yes browseable = yes read only = No inherit acls = yes fruit:time machine = yes
Backups will be stores under /srv/backup/timemachine/$USERNAME
You will need to create the folders and the user:
mkdir -p /srv/backup/timemachine/
/usr/local/samba/bin/smbpasswd -a $USERNAME
mkdir -m 700 /srv/backup/timemachine/$USERNAME; chown $USERNAME /srv/backup/timemachine/$USERNAME
Quotas
To set quotas you need to put a .com.apple.TimeMachine.quota.plist file:
cat <<< _EOF_ > /srv/backup/timemachine/$USERNAME/.com.apple.TimeMachine.quota.plist
<?xml version="1.0" encoding="UTF-8"?>
<!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>300000000000</integer>
</dict>
</plist>
_EOF_To calculate the interger use MB * 1000000 (300GB in this example).
starting
systemctl enable smb.service; systemctl start smb.service
done
Edit1) Some input from u/g-a-c
I am trying to set up smb file sharing for Time Machine backup in order to downgrade from Tahoe to Sequoia, but smb file sharing is showing ZERO connected servers, even being connected to an external disk via smb.
Anyone having the same issue?
I am following this guide from apple support:
https://support.apple.com/guide/mac-help/back-up-to-a-shared-folder-mchl31533145/26/mac/26
I backup my Linux system using borg which works fine, but now I would like to also add Time Machine for my old Macbook. Though I have tried many things and end up with the message in Time Machine when selecting the drive as a backup drive:
The selected network backup disk does not support the required capabilities. Please choose a different network backup disk.
There isn't that much documentation on Samba's Time Machine functionality using the fruit module. Though I have tried almost every single setting and permutation of settings, that I don't know what to do. Here is all of the information that I can think of giving, if you require more information I'd be happy to oblige. I can access the share (and it works properly), but I cannot use it as a Time Machine backup disk.
OS: Ubuntu 18.04 LTS
Samba version: 4.9.4
/etc/samba/smb.conf (I simply removed most comments):
[global]
mdns name = mdns
# Time Machine
# Changing this setting does not affect the model that MacOS shows.
# The only way to change that is to manually configure it in an avahi service file.
fruit:model = RackMac
fruit:advertise_fullsync = true
fruit:aapl = yes
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=524288 SO_SNDBUF=524288
fruit:veto_appledouble = yes
#fruit:encoding = private
#fruit:metadata = netatalk
#fruit:locking = netatalk
#ea support = yes
#fruit:resource = file
server min protocol = SMB2
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
workgroup = WORKGROUP
server string = Server User
dns proxy = no
log file = /var/log/samba/log.%m
log level = 3
max log size = 1000
syslog = 0
panic action = /usr/share/samba/panic-action %d
server role = standalone server
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
pam password change = yes
map to guest = bad user
usershare allow guests = yes
[Time Machine User]
path = /mnt/encrypted_storage/Time Machine
fruit:aapl = yes
fruit:time machine = yes
valid users = user
writable = yes
kernel oplocks = no
kernel share modes = no
posix locking = no
vfs objects = catia fruit streams_xattrI'm building a Ubuntu/Pi-based NAS with 2x5TB drives in a ZFS mirrored pool. I'd like to use a portion of these drives (1TB) for Time Machine. Can I setup Samba on the 5TB volume and spec a directory within it for Time Machine? Or do I need a dedicated physical drive on its own Samba share for Time Machine?
Thanks!
I don't have access to my/a FreeNAS box this weekend, and need a quick question answered:
Does TimeMAchine support (in the list of services) require Apple fire sharing, or can it work over Samba (latest builds of Samba support it)?
If the latter, would someone please post their smb.conf (or maybe samba.conf if I'm not recalling the file name correctly) so that I can see a (working) config example?
If you use a recent FreeNAS 11.2 build, you can create an SMB share and then check the "time machine" box. This will handle all of the configuration for you. The same for AFP shares. They can be flagged as "time machine".
I think apfs has actually been deprecated for timemachine and samba is now preferred as far as apple is concerned. The trouble is you need samba 4.8 with the vfs_fruit extension which I don’t believe is stable in the latest Freenas just yet. There may be experimental support but I don’t think it’s ready for prime time.
Hi,
I just wanted to share my experience with the new vfs_fruit extension in samba 4.8
I've got three macbooks at home and want them to have time machine backups. The current way to go is a netatalk implementation, but it is horrible slow and buggy. But with the new vfs_fruit extension in samba 4.8 it works awesomely fine.
This copy+paste howto is just to get it running with some lazy workarounds and a little bit of documentation. Tested with Ubuntu 16.04
Some notes:
-
Samba 4.8 will not be in Ubuntu 18.04.
-
Currently Samba 4.8 is available as RC.
-
Release is currently planned for tomorrow, maybe (https://wiki.samba.org/index.php/Release_Planning_for_Samba_4.8)
-
Ensure you create encrypted backups
-
Tested with high sierra. Feel free to test it with other osx versions.
-
You can even make a full restore when you got a new macbook.
-
Don't blame me for anything. I am not even good at this stuff.
-
Feel free to message me with more input
-
I have very limited time to use reddit, so please be patient when I don't answer directly
Avahia:
apt -y install avahi-daemon
cat <<< _EOF_ > /etc/avahi/services/timemachine.service <?xml version="1.0" standalone='no'?> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_smb._tcp</type> <port>445</port> </service> <service> <type>_device-info._tcp</type> <port>0</port> <txt-record>model=RackMac</txt-record> </service> <service> <type>_adisk._tcp</type> <txt-record>sys=waMa=0,adVF=0x100</txt-record> <txt-record>dk0=adVN=TimeMachine Home,adVF=0x82</txt-record> </service> </service-group> _EOF_
There is the line <txt-record>dk0=adVN=TimeMachine Home,adVF=0x82</txt-record> where TimeMachine Home is the name your mac will display (https://imgur.com/a/iezWt).
Samba 4.8
prerequisites
apt -y install install acl attr autoconf bind9utils bison build-essential \ debhelper dnsutils docbook-xml docbook-xsl flex gdb libjansson-dev krb5-user \ libacl1-dev libaio-dev libarchive-dev libattr1-dev libblkid-dev libbsd-dev \ libcap-dev libcups2-dev libgnutls28-dev libgpgme11-dev libjson-perl \ libldap2-dev libncurses5-dev libpam0g-dev libparse-yapp-perl \ libpopt-dev libreadline-dev nettle-dev perl perl-modules pkg-config \ python-all-dev python-crypto python-dbg python-dev python-dnspython \ python3-dnspython python-gpgme python3-gpgme python-markdown python3-markdown \ python3-dev xsltproc zlib1g-dev
compiling
Get the current RC here: https://download.samba.org/pub/samba/rc/
wget https://download.samba.org/pub/samba/rc/samba-4.8.0rc4.tar.gz; tar -xzf samba-4.8.0rc4.tar.gz; cd samba-4.8.0rc4
./configure --with-systemd --systemd-install-services --with-systemddir=/lib/systemd/system \ --sysconfdir=/etc/samba --jobs=`nproc --all` make --jobs=`nproc --all` && make install
This will install samba to /usr/local/samba, puts configs under /etc/samba and installs the systemd services to /lib/systemd/system and it will use all your cpu cores for compiling.
Adjusting start scipt
sed -i 's/Type=notify/Type=simple/g' /lib/systemd/system/smb.service
Fixed some issues while starting the service.
configure samba
/etc/samba/smb.conf [global] # Basic Samba configuration server role = standalone server passdb backend = tdbsam obey pam restrictions = yes security = user printcap name = /dev/null load printers = no socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=524288 SO_SNDBUF=524288 server string = Samba Server %v map to guest = bad user dns proxy = no wide links = yes follow symlinks = yes unix extensions = no acl allow execute always = yes log file = /var/log/samba/%m.log max log size = 1000 # Special configuration for Apple's Time Machine fruit:model = MacPro fruit:advertise_fullsync = true fruit:aapl = yes ## Definde your shares here [TimeMachine Home] path = /srv/backup/timemachine/%U valid users = %U writable = yes durable handles = yes kernel oplocks = no kernel share modes = no posix locking = no vfs objects = catia fruit streams_xattr ea support = yes browseable = yes read only = No inherit acls = yes fruit:time machine = yes
Backups will be stores under /srv/backup/timemachine/$USERNAME
You will need to create the folders and the user:
mkdir -p /srv/backup/timemachine/
/usr/local/samba/bin/smbpasswd -a $USERNAME
mkdir -m 700 /srv/backup/timemachine/$USERNAME; chown $USERNAME /srv/backup/timemachine/$USERNAME
Quotas
To set quotas you need to put a .com.apple.TimeMachine.quota.plist file:
cat <<< _EOF_ > /srv/backup/timemachine/$USERNAME/.com.apple.TimeMachine.quota.plist
<?xml version="1.0" encoding="UTF-8"?>
<!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>300000000000</integer>
</dict>
</plist>
_EOF_To calculate the interger use MB * 1000000 (300GB in this example).
starting
systemctl enable smb.service; systemctl start smb.service
done
Edit1) Some input from u/g-a-c
I've been trying to make an SMB time capsule for months now... I follow the various guides exactly and I always end up with some cryptic error when I try to actually back up. Has anyone successfully made their own SMB TM server yet? If so, how?
You need a recent version of OS X (high sierra or later) and Samba > 4.8 with the right apple extensions.
Centos 7 fits the requirements and I'm running a CentOS minimal container with the following in smb.conf
[timemachine]
comment = Time Machine
path = /timemachine
browseable = yes
writeable = yes
create mask = 0600
directory mask = 0700
spotlight = yes
vfs objects = catia fruit streams_xattr
fruit:aapl = yes
fruit:time machine = yes
also make sure to enable nmb and winbind services (winbind needs the samba-winbind package)
I can tell you that I’ve never had any homemade network Time Machine backup working for longer than a week or two. I don’t know what the problem is, but it always fails. I can’t find any answers either. The best I can find is people having the exact same issues and saying to just give up on having a networked backup and just do it through USB.
I've just set up a clone of an Apple Time Capsule device via the well documented method of setting up a Samba share and advertising it with mDNS.
For the backup itself, it's working just fine. However, I have the icon appearing in the Finder, and it would be nice if double-clicking it could take me to the underlying Samba share. However, I'm not sure if this is possible.
In my case I'm using dnsd through systemd-resolved, so I have:
[Service] Name=Time Capsule Type=_adisk._tcp TxtText=dk0=adVN=Time Capsule,adVF=0x82 sys=waMa=0,adVF=0x100
and also
[Service]
Name={{ services.timeMachine.displayName }}
Type=_device-info._tcp
TxtText=model=TimeCapsule8,119Samba is set up as standard on port 445. So the question is whether I can customise at least the _adisk._tcp to point to the underlying Samba share for neatness.
Is it possible? If so, how?
Thanks in advance
Hi all, does anyone currently use Time Machine but instead of an external drive use a network share and if so, how have you set it up?
Edit: I can't edit the title but I forgot to specify APPLE Time Machine, for people who don't know what that is just don't comment on this post, and/or don't use Macs.
I have a Debian 12 server with another internal HDD for Backups. I have the HDD formatted to ext4 (I don't know if that's important). I am hosting a Samba server. It has a share called "MacBook Backups" and it's normally visible when looking through Windows File Manager, and even Finder but it doesn't show up in the Time Machine "Choose Disk" menu at all.
Anyone here got Time Machine working with Samba 4.13.13-Debian armv7l? Been battling with it for days now (and previously got help here to switch from exFAT to ext4 on the server) but macOS & Samba still refuse to play nice :(
I can get initial backup to the smb share running just fine, and pausing the backup, resuming it, even with Mac sleep or server reboot in between don't seem to bother it at all. But every time after rebooting the Mac, the TM is no longer able to login. That is until I rm -r everything from the share at the server end, and tell TM to start all over again. It does then login successfully with previously entered credentials.
Only hints towards the cause are these two errors on Samba log, which is absolutely flooded with these:
[2021/12/23 10:05:21.303955, 0] ../../source3/modules/vfs_fruit.c:4956(fruit_tmsize_do_dirent)
fruit_tmsize_do_dirent: tmsize potential overflow: bandsize [134217728] nbands [89]
[2021/12/23 10:05:21.304103, 0] ../../source3/smbd/dfree.c:140(sys_disk_free)
sys_disk_free: VFS disk_free failed. Error was : Success
[2021/12/23 10:05:21.388545, 0] ../../source3/modules/vfs_fruit.c:4956(fruit_tmsize_do_dirent)
fruit_tmsize_do_dirent: tmsize potential overflow: bandsize [134217728] nbands [89]
[2021/12/23 10:05:21.388688, 0] ../../source3/smbd/dfree.c:140(sys_disk_free)
sys_disk_free: VFS disk_free failed. Error was : Success
[2021/12/23 10:38:33.543154, 0] ../../source3/modules/vfs_fruit.c:4956(fruit_tmsize_do_dirent)
fruit_tmsize_do_dirent: tmsize potential overflow: bandsize [134217728] nbands [89]
[2021/12/23 10:38:33.543286, 0] ../../source3/smbd/dfree.c:140(sys_disk_free)
sys_disk_free: VFS disk_free failed. Error was : Invalid or incomplete multibyte or wide character
[2021/12/23 10:39:38.106546, 0] ../../source3/modules/vfs_fruit.c:4956(fruit_tmsize_do_dirent)
fruit_tmsize_do_dirent: tmsize potential overflow: bandsize [134217728] nbands [89]
[2021/12/23 10:39:38.106675, 0] ../../source3/smbd/dfree.c:140(sys_disk_free)
sys_disk_free: VFS disk_free failed. Error was : Invalid or incomplete multibyte or wide character
[2021/12/23 10:40:42.297052, 0] ../../source3/modules/vfs_fruit.c:4956(fruit_tmsize_do_dirent)
fruit_tmsize_do_dirent: tmsize potential overflow: bandsize [134217728] nbands [89]
[2021/12/23 10:40:42.297122, 0] ../../source3/smbd/dfree.c:140(sys_disk_free)
sys_disk_free: VFS disk_free failed. Error was : Invalid or incomplete multibyte or wide character
And here's what Time Machine logs look like:
# initial time machine backup, paused, mac system sleep, backup server reboot, resume, pause again - everything works
021-12-23 10:05:29 Finishing session for '/System/Volumes/Data/Volumes/MacBookAir backups' with options: 4
2021-12-23 10:05:29 Finished session for '/System/Volumes/Data/Volumes/MacBookAir backups' with options: 4
2021-12-23 10:36:31 Running for notifyd event com.apple.mobile.keybagd.lock_status
2021-12-23 10:36:31 TMPowerState: 2
2021-12-23 10:36:31 Triggered for screen unlock!
2021-12-23 10:36:31 Running for notifyd event com.apple.mobile.keybagd.lock_status
2021-12-23 10:36:31 TMPowerState: 2
2021-12-23 10:36:31 Triggered for screen unlock!
2021-12-23 10:36:31 SIGTERM received, shutting down.
# after mac reboot:
2021-12-23 10:38:15 Running for notifyd event com.apple.system.powersources.source
2021-12-23 10:38:15 Running for notifyd event com.apple.mobile.keybagd.lock_status
2021-12-23 10:38:15 TMPowerState: 2
2021-12-23 10:38:15 Triggered for screen unlock!
2021-12-23 10:38:32 Starting manual backup
2021-12-23 10:38:32 Attempting to mount 'smb://Timemachine@Timemachine.local/Timemachine'
2021-12-23 10:38:33 NAConnectToServerSync failed with error: 13 (Permission denied for url: smb://Timemachine@Timemachine.local/Timemachine)
2021-12-23 10:38:33 Waiting 60 seconds and trying again.
2021-12-23 10:39:37 Attempting to mount 'smb://Timemachine@Timemachine.local/Timemachine'
2021-12-23 10:39:38 NAConnectToServerSync failed with error: 13 (Permission denied for url: smb://Timemachine@Timemachine.local/Timemachine)
2021-12-23 10:39:38 Waiting 60 seconds and trying again.
2021-12-23 10:40:41 Attempting to mount 'smb://Timemachine@Timemachine.local/Timemachine'
2021-12-23 10:40:42 NAConnectToServerSync failed with error: 13 (Permission denied for url: smb://Timemachine@Timemachine.local/Timemachine)
2021-12-23 10:40:42 Backup failed (19: BACKUP_FAILED_TARGETVOL_NOT_MOUNTED - The backup disk could not be resolved, or there was a problem mounting it.)
2021-12-23 10:42:09 TMPowerState: 2
2021-12-23 10:42:39 TMPowerState: 2
2021-12-23 10:42:39 Not prioritizing backups with priority errors. lockState=0
# after deleting all contents from samba tm share
2021-12-23 10:54:13 Starting manual backup
2021-12-23 10:54:13 Attempting to mount 'smb://Timemachine@Timemachine.local/Timemachine'
2021-12-23 10:54:13 Mounted 'smb://Timemachine@Timemachine.local/Timemachine' at '/Volumes/.timemachine/Timemachine.local/CEF9886F-C36E-4DB8-B3D5-F4F936132E8E/Timemachine' (1,29 TB of 1,29 TB available)
2021-12-23 10:54:13 Initial network volume parameters for 'Timemachine' {disablePrimaryReconnect: 0, disableSecondaryReconnect: 0, reconnectTimeOut: 60, QoS: 0x0, attributes: 0x1C}
2021-12-23 10:54:14 Configured network volume parameters for 'Timemachine' {disablePrimaryReconnect: 0, disableSecondaryReconnect: 0, reconnectTimeOut: 30, QoS: 0x20, attributes: 0x1C}
2021-12-23 10:54:14 Mountpoint '/Volumes/.timemachine/Timemachine.local/CEF9886F-C36E-4DB8-B3D5-F4F936132E8E/Timemachine' is still valid
2021-12-23 10:54:14 Mountpoint '/Volumes/.timemachine/Timemachine.local/CEF9886F-C36E-4DB8-B3D5-F4F936132E8E/Timemachine' is still valid
2021-12-23 10:54:14 Using a band size of 128 MB (max bands set to 16384, image size 1,22 TB)
2021-12-23 10:54:14 Creating a sparsebundle using Case-sensitive APFS filesystem
During the initial backup creation there are a couple of extra hints in TM logs too:
2021-12-23 11:07:09 Failed to create session for '/System/Volumes/Data/Volumes/MacBookAir backups' with options: 4, error: Error Domain=TMStructureErrorDomain Code=4 "APFSMachineStore - Structure missing" UserInfo={NSUnderlyingError=0x157f06a20 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}, TMStructureStructureName=APFSMachineStore, NSLocalizedDescription=APFSMachineStore - Structure missing}
2021-12-23 11:11:24 Failed destination write test with error Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out". Wrote 27,1 MB in 1 file.
2021-12-23 11:11:30 Found Zero KB (1 items of content to propagate down to depth 3 under "/Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/MacBookAir/2021-12-23-111125/Data")
In some earlier tests with different smb.conf I also got these two that look similar, but now they do not seem to pop up anymore.
Failed to read 'file:///Volumes/.timemachine/Timemachine.local/FF8A0364-1E6E-4C97-989B-37CE8CC86551/Timemachine/9C31775C-29FC-5FAA-811C-E83984489400.sparsebundle/com.apple.TimeMachine.MachineID.plist', error: Error Domain=NSCocoaErrorDomain Code=260 "The file “com.apple.TimeMachine.MachineID.plist” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Volumes/.timemachine/Timemachine.local/FF8A0364-1E6E-4C97-989B-37CE8CC86551/Timemachine/9C31775C-29FC-5FAA-811C-E83984489400.sparsebundle/com.apple.TimeMachine.MachineID.plist, NSUnderlyingError=0x13f932340 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
Failed to read 'file:///Volumes/.timemachine/Timemachine.local/FF8A0364-1E6E-4C97-989B-37CE8CC86551/Timemachine/9C31775C-29FC-5FAA-811C-E83984489400.sparsebundle/com.apple.TimeMachine.MachineID.bckup', error: Error Domain=NSCocoaErrorDomain Code=260 "The file “com.apple.TimeMachine.MachineID.bckup” couldn’t be opened because there is no such file." UserInfo={NSFilePath=/Volumes/.timemachine/Timemachine.local/FF8A0364-1E6E-4C97-989B-37CE8CC86551/Timemachine/9C31775C-29FC-5FAA-811C-E83984489400.sparsebundle/com.apple.TimeMachine.MachineID.bckup, NSUnderlyingError=0x13f8240c0 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}
My smb.conf is essentially a copy of this, with the potentially problematic server multi channel support = Yes commented out and of course paths and users changed:
https://bugzilla.samba.org/show_bug.cgi?id=14910
Any and all hints are greatly appreciated -- this Raspberry Time Capsule is supposed to be a Christmas present :)
I want to change backing up my Macbook to not use an external drive I have to manually connect all the time, so I thought of using the infrastructure I already have, namely both pve and pbs. I've come up with two ways, using the mbentley/docker-timemachine project for ease of configuration (of Samba and Avahi):
-
Install Docker directly on pbs, and point the target volume to the same disk my pve backups are targeted.
-
Use the image in my existing Docker vm on pve, adding a disk image to this vm as target for tm, which would get backed up to pbs.
Option 1 would have the advantage of not using space on the pve node, which never was meant for backups (would probably need to add an additional physical disk for that), but it somehow feels just wrong.
How would you approach this? Do you have a third, better option?
I can't seem to get Big Sur 11.0.1 working with my Samba Linux box for Time Machine backups. It was working up until about a week ago, and my Mojave machines are backing up successfully. Anyone else have this issue? It gets a permission issue when I start a fresh backup or can't touch an existing one. I can create files and modify everything on the share, but TimeMachine is having some problem (maybe extended attributes) with creating more that the <MachineID>.sparsebundle file.