Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: MacOS 15.0.X TimeMachine Backup is skipping #185

Closed
exomor opened this issue Oct 11, 2024 · 12 comments
Closed

[Bug]: MacOS 15.0.X TimeMachine Backup is skipping #185

exomor opened this issue Oct 11, 2024 · 12 comments
Assignees

Comments

@exomor
Copy link

exomor commented Oct 11, 2024

Describe the Bug

Hello mbentley,

thanks for your very helpful docker container! I'm using it a lot!

Unfortunately since the MacOS Update to 15.0.X there are on multiple clients some issues.
When the TimeMachine backup starts, the client finds and connects to the container. It also detects that there are changes and begins copying them. However, after a short time (a few seconds to 2 minutes), there are repeated interruptions with the error message “The backup disk image was ejected or disconnected from your Mac while backing up.”

This issue occurs over both WLAN and LAN. On a test device with macOS version 14.X, these problems do not occur. However, the problem exists on all clients with version 15.0.X

Expected Behavior

That the connection dont fail.

Steps to Reproduce

  1. update your Mac to Version 15.0.X
  2. Update your Docker container to the latest image
  3. Start your TimeMachine Backup

How You're Launching the Container

version: '3.7'

services:
  timemachine:
    image: mbentley/timemachine:smb
    container_name: timemachine			
    hostname: timemachine
    restart: "no"
    environment:
      # Allgemeine Konfiguration
      CUSTOM_SMB_CONF: "false"
      CUSTOM_USER: "false"
      DEBUG_LEVEL: "1"
      MIMIC_MODEL: "TimeCapsule8,119"   # Emuliert ein bestimmtes Time Capsule Modell
      EXTERNAL_CONF: ""
      HIDE_SHARES: "no"
      
      # Benutzer- und Gruppeninformationen
      TM_USERNAME: "myUserName"        # Benutzername für TimeMachine
      TM_GROUPNAME: "myGroupName"       # Gruppenname
      TM_UID: "myID"                    # Benutzer-ID (anpassen, falls nötig)
      TM_GID: "myGID"                    # Gruppen-ID (anpassen, falls nötig)
      PASSWORD: "myPW"           # Passwort für den Benutzer innerhalb der Anführungsstriche
      
      # Berechtigungseinstellungen
      SET_PERMISSIONS: "false"
      SMB_INHERIT_PERMISSIONS: "no"
      SMB_NFS_ACES: "yes"
      SMB_METADATA: "stream"
      SMB_VFS_OBJECTS: "acl_xattr fruit streams_xattr"
      
      # Share-Einstellungen
      SHARE_NAME: "TimeMachine"         # Anzeigename des Sharings - so wird die Freigabe auf den Macs angezeigt
      VOLUME_SIZE_LIMIT: "0"            # Größenlimit (0 = unbegrenzt)
      
      # Netzwerk- und Arbeitsgruppeneinstellungen
      SMB_PORT: "445"                   # SMB-Port (Standard ist 445)
      WORKGROUP: "WORKGROUP"            # Arbeitsgruppe (anpassen, falls erforderlich)
    networks:
      macvlan1:
        # 
        ipv4_address: 192.168.X.60
    volumes:
      # Lokaler Pfad zum Speichern der Backups der MacBooks
      - /zhome/timemachine:/opt/timemachine
      # Benannte Volumes für Samba
      - timemachine-var-lib-samba:/var/lib/samba
      - timemachine-var-cache-samba:/var/cache/samba
      - timemachine-run-samba:/run/samba

volumes:
  # Definition der benannten Volumes (werden automatisch erstellt)
  timemachine-var-lib-samba:
  timemachine-var-cache-samba:
  timemachine-run-samba:

networks:
  macvlan1:
    driver: macvlan
    driver_opts:
      parent: enp4s0f0  # Hier muss der Netzwerkkartenname (oder Schnittstelle (z.B. br0)) eingetragen werden
    ipam:
      config:
        - subnet: 192.168.X.0/24       
          gateway: 192.168.X.1

Container Logs

INFO: CUSTOM_SMB_CONF=false; generating [global] section of /etc/samba/smb.conf...
INFO: Creating /var/log/samba/cores
INFO: Avahi - generating base configuration in /etc/avahi/services/smbd.service...
INFO: Avahi - adding the 'dk0', 'TimeMachine' share txt-record to /etc/avahi/services/smbd.service...
INFO: Group myGroup doesn't exist; creating...
INFO: User myUser doesn't exist; creating...
INFO: Using default password: timemachine
chpasswd: password for 'timemachine' changed
INFO: INFO: CUSTOM_SMB_CONF=false; generating [TimeMachine] section of /etc/samba/smb.conf...
INFO: Samba - Created User myUser password set to none.
INFO: Samba - Enabled user myUser.
INFO: Samba - setting password
INFO: SET_PERMISSIONS=false; not setting ownership and permissions for /opt/timemachine
INFO: Avahi - completing the configuration in /etc/avahi/services/smbd.service...
INFO: running test for xattr support on your time machine persistent storage location...
INFO: xattr test successful - your persistent data store supports xattrs
INFO: Detected filesystem for /opt/timemachine is zfs
INFO: entrypoint complete; executing 's6-svscan /etc/s6'
dbus socket not yet available; sleeping...
nmbd version 4.19.6 started.
Copyright Andrew Tridgell and the Samba Team 1992-2023
smbd version 4.19.6 started.
Copyright Andrew Tridgell and the Samba Team 1992-2023
query_name_response: Multiple (2) responses received for a query on subnet 192.168.X.60 for name WORKGROUP<1d>.
This response was from IP 192.168.X.13, reporting an IP address of 192.168.X.13.
Found user 'avahi' (UID 86) and group 'avahi' (GID 86).
Successfully dropped root privileges.
avahi-daemon 0.8 starting up.
WARNING: No NSS support for mDNS detected, consider installing nss-mdns!
Loading service file /etc/avahi/services/smbd.service.
Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.X.60.
New relevant interface eth0.IPv4 for mDNS.
Joining mDNS multicast group on interface lo.IPv6 with address ::1.
New relevant interface lo.IPv6 for mDNS.
Joining mDNS multicast group on interface lo.IPv4 with address 127.0.0.1.
New relevant interface lo.IPv4 for mDNS.
Network interface enumeration completed.
Registering new address record for 192.168.X.60 on eth0.IPv4.
Registering new address record for ::1 on lo.*.
Registering new address record for 127.0.0.1 on lo.IPv4.
Server startup complete. Host name is timemachine.local. Local service cookie is 4080583500.
Service "timemachine" (/etc/avahi/services/smbd.service) successfully established.
set_canon_ace_list: sys_acl_set_file on file [.com.apple.timemachine.supported-2c4c6f79-52a1-4c49-94df-60fea07a83a7]: (Not supported)
set_canon_ace_list: sys_acl_set_file on file [MacBook Pro.sparsebundle/com.apple.TimeMachine.MachineID.plist.tmp]: (Not supported)
set_canon_ace_list: sys_acl_set_file on file [MacBook Pro.sparsebundle/com.apple.TimeMachine.SnapshotHistory.plist.tmp]: (Not supported)
set_canon_ace_list: sys_acl_set_file on file [MacBook Pro.sparsebundle/bands/889]: (Not supported)
set_canon_ace_list: sys_acl_set_file on file [MacBook Pro.sparsebundle/mapped/889]: (Not supported)
vfs_default_durable_reconnect (MacBook Pro.sparsebundle/bands/889): stat_ex.st_ex_size differs: cookie:229638144 != stat:230686720, denying durable reconnect

Time Machine client Logs

2024-10-11 10:57:05  Failed to get resource value 'NSURLVolumeURLForRemountingKey' for '/Volumes/.timemachine/192.168.X.60/timemachine', error: Permission denied
2024-10-11 10:57:08  Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/timemachine', error: Operation not permitted
2024-10-11 10:57:17  Invalid mountpoint '/Volumes/Backups of MacBook Pro (2)' - no volume mounted at this path
2024-10-11 10:57:17  Detected copy error -37 due to disconnected destination!
2024-10-11 11:03:05  Bonjour resolution not possible for 'smb://[email protected]/timemachine'
2024-10-11 11:03:07  Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/timemachine', error: Operation not permitted
2024-10-11 11:03:18  Failed to get resource value 'NSURLVolumeURLForRemountingKey' for '/Volumes/.timemachine/192.168.X.60/timemachine', error: Permission denied
2024-10-11 11:03:23  Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/timemachine', error: Operation not permitted
2024-10-11 11:03:28  Starting age based thinning of Time Machine local snapshots on disk '/System/Volumes/Data'
2024-10-11 11:03:30  Created Time Machine local snapshot with name 'com.apple.TimeMachine.2024-10-11-110328.local' on disk '/System/Volumes/Data'
2024-10-11 11:03:32  Using APFS snapshot diffing for source: "Macintosh HD - Data"
2024-10-11 11:03:39  Failed to get resource value 'NSURLVolumeURLForRemountingKey' for '/Volumes/.timemachine/192.168.X.60/timemachine', error: Permission denied
2024-10-11 11:03:42  Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/timemachine', error: Operation not permitted
2024-10-11 11:04:26  Injecting event for exclusion changed since last backup: Users/myUser/Library/Application Support/Google/Chrome/PrivacySandboxAttestationsPreloaded/2024.10.7.0
2024-10-11 11:04:47  Invalid mountpoint '/Volumes/Backups of MacBook Pro (2)' - no volume mounted at this path
2024-10-11 11:04:47  Detected copy error -36 due to disconnected destination!
2024-10-11 11:04:47  Copy stage failed with error: Error Domain=com.apple.backupd.ErrorDomain Code=11 "(null)" due to disconnected network.
2024-10-11 11:04:58  Finished rotating through all destinations. Backup failed: BACKUP_FAILED_DISCONNECTED_NETWORK (26)
2024-10-11 11:04:59  Failed to mount '(null)', error: TMStructureErrorDomain Code=4 "(null)"
2024-10-11 11:04:59  Failed to unmount '/Volumes/.timemachine/2642448E-0821-408B-8BB5-EB65B808F1F0/2023-10-29-144732.backup', error: TMStructureErrorDomain Code=4

Additional host information

Client: Docker Engine - Community
 Version:    27.3.1
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.17.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.29.7
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 21
  Running: 21
  Paused: 0
  Stopped: 0
 Images: 36
 Server Version: 27.3.1
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7f7fdf5fed64eb6a7caf99b3e12efcf9d60e311c
 runc version: v1.1.14-0-g2c9f560
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 5.15.0-122-generic
 Operating System: Ubuntu 22.04.5 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 27.4GiB
 Name: homeserver
 ID: V77Z:PXJF:MX4D:IO3T:3IEB:QTKV:U2SK:PT7Y:33NG:VGVK:FEIJ:OV3M
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: bridge-nf-call-iptables is disabled
WARNING: bridge-nf-call-ip6tables is disabled


PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Additional Context

In the Docker logs, you can see a message indicating “(query_name_response: Multiple responses…)” multiple responses. However, I have verified several times that 192.168.X.60 is used exclusively by the Docker container.

I had to shorten the Logs because of the character limit. I added the most important log parts.

I'm assuming that Apple has changed the way how it uses SMB. So I don't think that further updates of MacOS will solve the communication problem with the docker container. What so you think about it?

I would appreciate any help

@mbentley mbentley changed the title [Bug]: MacOS 18.0.X TimeMachine Backup is skipping [Bug]: MacOS 15.0.X TimeMachine Backup is skipping Oct 11, 2024
@mbentley
Copy link
Owner

mbentley commented Oct 11, 2024

The "multiple responses" line is because your WORKGROUP is apparently not unique on the network. You can try to set it to something besides WORKGROUP but I am not sure if that will change anything. It really doesn't matter at all for TimeMachine usage and can be a random string for all it cares.

I know it's not really helpful but I haven't had any specific issues with macOS 15 and Time Machine. My two hosts running 15 have backed up without any issues or config changes required. I haven't yet gone through all of the configuration options you have in your container vs the default yet but just thought I would at least share the bit about the workgroup for now.

*edit: I am really only seeing two defaults that are different from the default of:

SMB_NFS_ACES: "no"
SMB_VFS_OBJECTS: "fruit streams_xattr"

I will have to find the issues where I've changed those but I also don't believe that these would specifically cause the issues you're seeing with the share disconnecting.

@exomor
Copy link
Author

exomor commented Oct 12, 2024

I also noticed the message with the multiple responses and initially dismissed it as a cause of the problem since it still works without issues on 14.X. I have now changed the Workgroup name to a unique one, but the problem persists.

I also removed the non-standard configurations, but unfortunately, this didn’t help. In fact, without these settings, the backup fails almost immediately.

The fact that the backups are running smoothly for you is interesting. Which server operating system are you running the Docker instance on?

Do you happen to have any other ideas on what could be causing this? I’m a bit at a loss here.

The following areas seem to be running fine:

•	The Docker container is pingable without interruptions
•	smartctl shows no errors on the affected hard drives
•	dmesg shows no issues

I created a new server (Ubuntu) and used different drives, but the problem persists. To me, this narrows the issue down to the network and the Mac devices themselves. Since it works without issue on 14.X, I suspect the problem lies with the Mac. I would rule out WLAN issues, as it also occurs with LAN connections. This again leads to the assumption that Apple may have made some adjustments to SMB, causing these problems. However, what puzzles me is that it works fine for you.

If you have any further ideas, I would be grateful.

@mbentley
Copy link
Owner

mbentley commented Oct 12, 2024

I guess I'm not surprised that the workgroup change didn't impact anything. Changing the settings for the backups seems like it causes them to fail unless you re-create them in some cases - not exactly sure why but I recall seeing similar behavior in the past. I'm using Debian 12 (bookworm) for the Docker host OS. My persistent storage for time machine is on a zfs filesystem and I am using macvlan for my container's networking. My run command is very basic:

docker run -d \
  --restart unless-stopped \
  --name timemachine \
  --hostname timemachine \
  --network macvlan1 \
  --ip 192.168.2.162 \
  -e DEBUG_LEVEL="1" \
  -e MIMIC_MODEL="TimeCapsule8,119" \
  -e PASSWORD="password" \
  -e SET_PERMISSIONS="true" \
  -e SHARE_NAME="TimeMachine" \
  -e VOLUME_SIZE_LIMIT="3 T" \
  -e WORKGROUP="WORKGROUP" \
  -e IGNORE_DOS_ATTRIBUTES="true" \
  --mount type=bind,source=/zfs/storage/timemachine/data,destination=/opt/timemachine,readonly=false \
  --mount type=bind,source=/zfs/storage/timemachine/logs,destination=/var/log,readonly=false \
  --mount type=tmpfs,destination=/run/samba \
  --cpus 4 \
  --memory 1g \
  --memory-swap 2g \
  mbentley/timemachine

One thing I might suggest is checking out TheTimeMachineMechanic (T2M2) from here. It tries to pull together logs from the Mac side of things to determine why a backup might be failing.

@shred86
Copy link

shred86 commented Oct 12, 2024

I'm having this same issue on macOS 15.0.1. This container is running on a mini PC home server running the latest version of Debian. I just tried deleting my backup and setting up Time Machine again on my Mac but it's still having the same issue.

My docker-compose.yml:

  samba:
    image: mbentley/timemachine:smb
    container_name: samba
    restart: unless-stopped
    environment:
      - PASSWORD_FILE=/run/secrets/samba_password
      - SHARE_NAME=Backup
    secrets:
      - samba_password
    volumes:
      - /home/myuser/backup/timemachine:/opt/timemachine
    tmpfs:
      - /run/samba
    ports:
      - 172.16.16.1:137:137/udp
      - 172.16.16.1:138:138/udp
      - 172.16.16.1:139:139
      - 172.16.16.1:445:445

I don't know if it's related, but I did notice in the container logs some error messages that I don't remember seeing before:

scavenger_timer: Failed to cleanup share modes and byte range locks for file 2080:27265175:0 open 1279168831
scavenger_timer: Failed to cleanup share modes and byte range locks for file 2080:27265191:0 open 3270154402
scavenger_timer: Failed to cleanup share modes and byte range locks for file 2080:31457284:0 open 3976927288
scavenger_timer: Failed to cleanup share modes and byte range locks for file 2080:31457286:0 open 827799069
scavenger_timer: Failed to cleanup share modes and byte range locks for file 2080:31457296:0 open 2572725033
scavenger_timer: Failed to cleanup share modes and byte range locks for file 2080:31457297:0 open 4065113298
scavenger_timer: Failed to cleanup share modes and byte range locks for file 2080:31457288:0 open 2610216580
scavenger_timer: Failed to cleanup share modes and byte range locks for file 2080:31457289:0 open 2799112580

@belykhk
Copy link

belykhk commented Oct 13, 2024

I too has same issue after updating to 15.0.1.

Tried to install samba on host machine (Ubuntu 24.04.1 LTS), reinitialize backup, change from encrypted to non - same behavior. I do also see scavenger_timer messages in docker container and shortly after that backup fails.

My compose config:

  timemachine:
    image: mbentley/timemachine:smb
    container_name: timemachine
    restart: unless-stopped
    network_mode: "host"
    volumes:
      - /mnt/backups/timemachine:/opt/[REDACTED]
    environment:
      - TM_USERNAME
      - TM_GROUPNAME
      - PASSWORD
      - TM_UID=1000
      - TM_GID=1000
      - SET_PERMISSIONS=true
      - VOLUME_SIZE_LIMIT=0
    logging:
      driver: "local"
      options: {}
    tmpfs:
      - /run/samba
    ulimits:
      nofile:
        soft: 65536
        hard: 65536
    healthcheck:
      test: sh /opt/[REDACTED]/healthcheck.sh || exit 1
      interval: 10s
      retries: 3
      start_period: 10s
      timeout: 3s

(healthcheck.sh is similar to one in the repo, but slightly changed to smbd, container is automatically updated with new versions via watchtower)

@mbentley
Copy link
Owner

I would suggest checking out TheTimeMachineMechanic (T2M2) from here to see if there is anything showing up in your Mac's logs that would indicate anything client side to help try to narrow that down.

@exomor
Copy link
Author

exomor commented Oct 14, 2024

Here is an excerpt from T2M2:

24-10-13 22:05:21.414 TimeMach    Limiting logging for limit: aFewTimes key: "map auto_home"
24-10-13 22:05:38.246 TimeMach    Bonjour took 0.1 seconds to resolve 'smb://timemachine._smb._tcp.local./TimeMachine' to 'smb://timemachine.local/TimeMachine'
24-10-13 22:05:38.246 TimeMach    Bonjour took 0.1 seconds to resolve 'smb://timemachine._smb._tcp.local./TimeMachine' to 'smb://timemachine.local/TimeMachine'
24-10-13 22:05:39.289 TimeMach    User tried to start a backup
24-10-13 22:05:39.293 TimeMach    Backup requested to next destination in rotation. specifiedOptions: TMBackupOptions(rawValue: 0)
24-10-13 22:05:39.295 TimeMach    lastDestinationID: 999047FD-CA4A-481E-9F39-BC53F72A7A92; nextDestinationID: 999047FD-CA4A-481E-9F39-BC53F72A7A92
24-10-13 22:05:39.295 TimeMach    Not rotating backup destinations, next destination is the same as the last destination.
24-10-13 22:05:39.298 TimeMach    Starting backup with mode "manual backup"
24-10-13 22:05:39.304 TimeMach    Attempting to mount 'smb://[email protected]/TimeMachine'
24-10-13 22:05:42.873 TimeMach    Initial network volume options for 'TimeMachine' {disablePrimaryReconnect: 0, disableSecondaryReconnect: 0, reconnectTimeOut: 0, QoS: 0x0, attributes: 0x1C}
24-10-13 22:05:43.098 TimeMach    Configured network volume options for 'TimeMachine' {disablePrimaryReconnect: 0, disableSecondaryReconnect: 0, reconnectTimeOut: 30, QoS: 0x20, attributes: 0x1C}
24-10-13 22:05:43.102 TimeMach    Mounted 'smb://[email protected]/TimeMachine' at '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine' (1.64 TB of 3.08 TB available)
24-10-13 22:05:43.107 TimeMach    Mountpoint '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine' is still valid
24-10-13 22:05:43.196 TimeMach    Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine', error: Operation not permitted
24-10-13 22:05:45.078 TimeMach    Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine', error: Operation not permitted
24-10-13 22:05:45.079 TimeMach    Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine', error: Operation not permitted

24-10-13 22:06:26.601 TimeMach    Doing secondary scan of nodes needing deep traversal (Macintosh HD - Data)
24-10-13 22:06:26.601 TimeMach    Finished secondary scan of Macintosh HD - Data
24-10-13 22:06:26.601 TimeMach    EventDatabase: node count: 3986 events processed: 7839 max depth: 13 strategy: APFS snapshot diffing (catch-up)
count: 3986
leaves: 2590
branches: 1396
eventAdds: 7839
merges: 4614
intermediateBranchesCreated: 761
maximumDepth: 13
Event Counts
contains changes: 7839
directory: 7839
24-10-13 22:06:26.629 TimeMach    Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine', error: Operation not permitted
24-10-13 22:06:26.634 TimeMach    Finished collecting events from volume "Macintosh HD - Data"
	        1397 Total Items Changed
Change Overview:
100% (1397): <Root of Tree>
48%  (681): Users/myUsername/Library
30%  (424): Library
21%  (303): Users/myUsername/Library/Containers/com.apple.Safari/Data/Library/WebKit/WebsiteData/Default
24-10-13 22:06:26.634 TimeMach    Finishing "Macintosh HD - Data":  37303 (-) of 100% - 1 viewpoints Average Speed: 3975.74 events/s
24-10-13 22:06:26.634 TimeMach    Finished collecting events on 1 volumes...
24-10-13 22:06:26.687 TimeMach    Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine', error: Operation not permitted
24-10-13 22:06:27.375 TimeMach    com.apple.backupd.sandbox.xpc: connection invalid
24-10-13 22:06:27.658 TimeMach    Estimated a total of 1807238 files (517.34 GB) will be in backup of 'Macintosh HD - Data'
24-10-13 22:06:27.658 TimeMach    Estimated full backup will contain 1807238 files (517.34 GB) from all sources
24-10-13 22:06:27.658 TimeMach    Disabling dataless directory preservation.
24-10-13 22:06:27.658 TimeMach    Skipping "Macintosh HD - Data" (device: /dev/disk3s1 mount: '/System/Volumes/Data' fsUUID: 5AC67233-DCFC-4FA1-8AE7-AAEA3CB07338 eventDBUUID: 30D8892D-77DF-4885-BB3F-4E88A8534805) for tree top progress. (APFS snapshot diffing (catch-up))
24-10-13 22:06:27.658 TimeMach    Starting propagation look-ahead for "Macintosh HD - Data"
24-10-13 22:06:27.659 TimeMach    No optimized moves cache needed for first backup.
24-10-13 22:06:27.659 TimeMach    Copying from source ""Macintosh HD - Data" (device: /dev/disk3s1 mount: '/System/Volumes/Data' fsUUID: 5AC67233-DCFC-4FA1-8AE7-AAEA3CB07338 eventDBUUID: 30D8892D-77DF-4885-BB3F-4E88A8534805)" to "/Volumes/Backups of MacBook Pro1/2024-10-13-220602.inprogress"
24-10-13 22:06:27.660 TimeMach    Changed from "none" to "deviceIsUnlocked"
24-10-13 22:06:28.148 TimeMach    Found Zero KB (1 items) of content to propagate down to depth 3 under "/Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/MacBook Pro/2024-10-13-220558/Macintosh HD - Data"
24-10-13 22:06:28.779 TimeMach    com.apple.backupd.sandbox.xpc: connection invalid
24-10-13 22:06:28.982 TimeMach    com.apple.backupd.sandbox.xpc: connection invalid
24-10-13 22:06:29.378 TimeMach    com.apple.backupd.sandbox.xpc: connection invalid
24-10-13 22:06:29.402 TimeMach    com.apple.backupd.sandbox.xpc: connection invalid
24-10-13 22:07:02.710 TimeMach    Limiting logging for limit: aFewTimes key: "map auto_home"
24-10-13 22:07:02.737 TimeMach    Failed to get resource value 'NSURLVolumeURLForRemountingKey' for '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine', error: Error Domain=NSCocoaErrorDomain Code=257 "The file “TimeMachine” couldn’t be opened because you don’t have permission to view it." UserInfo={NSURL=file:///Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine/, NSFilePath=/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine, NSUnderlyingError=0x6000028b8600 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
24-10-13 22:07:02.737 TimeMach    Failed to create volume info from disk '<TMDisk: 0x6000028b8f30> '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine'', error: missingURLForRemounting
24-10-13 22:07:22.209 DuetAS      Rescoring all 525 activities [<private>]
24-10-13 22:07:25.394 TimeMach    Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine', error: Operation not permitted
24-10-13 22:07:25.885 TimeMach    Limiting logging for limit: aFewTimes key: "map auto_home"
24-10-13 22:07:25.905 TimeMach    Failed to read capabilities for '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine', error: Operation not permitted
24-10-13 22:07:25.906 TimeMach    Failed to get resource value 'NSURLVolumeURLForRemountingKey' for '/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine', error: Error Domain=NSCocoaErrorDomain Code=257 "The file “TimeMachine” couldn’t be opened because you don’t have permission to view it." UserInfo={NSURL=file:///Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine/, NSFilePath=/Volumes/.timemachine/192.168.X.60/42C0D572-DF68-4D98-B688-D635BFEAE03A/TimeMachine, NSUnderlyingError=0x600000e06c10 {Error Domain=NSPOSIXErrorDomain Code=13 "Permission denied"}}
24-10-13 22:07:25.906 TimeMach    Limiting logging for limit: aFewTimes key: "//[email protected]/TimeMachine"

In addition, I have done the following things:

•	Read the Samba logs in the Docker container (log level 10) -> critical error: create_mdssvc_policy_handle: mds_init_ctx() path [/opt/timemachine] failed: NT_STATUS_WRONG_VOLUME
•	Reinstalled MacOS 15.01 -> no improvement
•	Checked the user ID/GID -> no issues
•	Checked permissions on my ZFS -> no issues
•	Checked permissions (SAMBA) within the Docker container -> no issues
•	Checked permissions when mounting the Time Machine storage location in Finder -> no issues
•	Checked ACL permissions on the ZFS -> no issues
•	Added the following adjustments:
server min protocol = SMB2
server max protocol = SMB3
fruit:aapl = yes
spotlight = yes
-> no improvement

•	Created an entirely new backup -> no improvement
•	Reset Time Machine and deleted the timemachine.plist file -> completely reconfigured Time Machine and reconnected -> no improvement

The permissions issue is a bit confusing here. As tested, the storage location can be accessed and edited without any problems. I don’t quite understand why T2M2 and the internal SAMBA logs are throwing errors.

@mbentley
Copy link
Owner

Maybe try just changing SMB_VFS_OBJECTS to fruit streams_xattr. I was looking back at #133 as it had similar errors reported.

@belykhk
Copy link

belykhk commented Oct 16, 2024

Maybe try just changing SMB_VFS_OBJECTS to fruit streams_xattr. I was looking back at #133 as it had similar errors reported.

Isn't it a default value, as per Entrypoint?


I've looked at logs of T2M2 on my machine and saw Failing backup with BACKUP_FAILED_DISCONNECTED_DISK_IMAGE (70). After some googling i've stumbed upon this thread on TrueNas' forums about same issue and surprisingly enough, disabling firewall on my mac is helped to get trough first backup.

@mbentley
Copy link
Owner

Maybe try just changing SMB_VFS_OBJECTS to fruit streams_xattr. I was looking back at #133 as it had similar errors reported.

Isn't it a default value, as per Entrypoint?

I've looked at logs of T2M2 on my machine and saw Failing backup with BACKUP_FAILED_DISCONNECTED_DISK_IMAGE (70). After some googling i've stumbed upon this thread on TrueNas' forums about same issue and surprisingly enough, disabling firewall on my mac is helped to get trough first backup.

Sorry, I should have specifically called out @exomor for that specific value because yes you're correct that is the default setting.

It's really difficult to figure out what in the logs is really a warning or if they're actual errors as there are many messages that sound like critical failures but turn out to not be.

That's interesting about the firewall. Makes me wonder if there is something with the firewall resetting states and re-applying the firewall rules or something like that. I do have the macOS firewall enabled on my Macbook but it would be interesting to see if anyone else can try to temporarily disable the firewall and try to take a backup and see if it is successful.

@exomor
Copy link
Author

exomor commented Oct 16, 2024

Maybe try just changing SMB_VFS_OBJECTS to fruit streams_xattr. I was looking back at #133 as it had similar errors reported.

Unfortunately, the error persists. This option doesn’t seem to be causing the trouble.

[...] and surprisingly enough, disabling firewall on my mac is helped to get trough first backup

That’s it. The firewall is causing the problem. I currently have two backups running. My MacBook Air successfully completed the last backup. The first backup from my MacBook Pro is still in progress. It will take a little longer, but after ~120GB, I’m feeling pretty confident.
I’ll check back in later to confirm if the backup completed successfully.

edit:

My primary backup was also completed successfully

edit edit 17.10:
After a few tests with some other clients, everyone works fine without the firewall. Maybe Apple will fix the problem in the next update. Thank you, guys, for your help! It really helped me a lot, and I unintentionally learned a lot about Samba

@exomor exomor closed this as completed Oct 17, 2024
@mbentley mbentley pinned this issue Oct 17, 2024
@belykhk
Copy link

belykhk commented Oct 28, 2024

Just small FYI: 15.1 released and issue was fixed on Apple's side without any mention in release notes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants
@mbentley @belykhk @shred86 @exomor and others