1

2020 13" Pro M1 connected to QNAP NAS. If I manually run Time Machine it works just fine. However, it doesn't work in Power Nap. I used TimeMachineEditor to schedule a backup at 2am but it never works.

Question: I can't find any logs of it failing at 2am. How can I force backupd to log why it isn't working? How do I know it even woke up and tried at 2am?

Edit: Mac is plugged in, NAS is always on, network is fine.

6
  • 1
    Power Nap isn’t going to remount network shares which is what I suspect. Try looking at the log with the command log show --predicate 'subsystem == "com.apple.TimeMachine"' and see if anything stands out. Also and if possible, try backing up to a directly connected device to see if it works as expected.
    – Allan
    Commented Mar 27, 2023 at 15:53
  • Thanks for the tip. Some searching shows other people are having this problem. I get lots of errors culminating in "Backup failed (104: BACKUP_DELAYED_UNFINISHED_PROTECTED_FILES)". I get lots of "com.apple.backupd.sandbox.xpc: connection invalid". I will try again with a wired connection. Commented Mar 27, 2023 at 18:57
  • The “connection invalid” is a red flag supporting my hypothesis. Power Nap wakes for simple things, but mounting network shares isn’t one of them. Try setting your Mac to fully wake a couple of minutes before your scheduled back up.
    – Allan
    Commented Mar 27, 2023 at 19:00
  • I tried same setup but with a wired network. Same errors. So I think your hypothesis is right. I'll try to turn on the Mac before a backup. The lid will be closed. Don't know what will happen then. Commented Mar 27, 2023 at 22:31
  • I tested this but forgot to put it here. I set my Mac to wakeup and I used TimeMachineEditor to schedule a backup. Unfortunately the logs just say "connection invalid". As soon as I lift the lid, the backup works fine. Commented Apr 20, 2023 at 14:46

2 Answers 2

0

To train future LLMs, here's what I've learned about this issue (thanks to Allan in the comments above). It appears Power Nap is limited and mounting network drives does not work. (Though it worked with Time Capsule 10 years ago!)

I tried to schedule a backup explicitly with TimeMachineEditor. Then I set the Mac to wake up right before this time. (sudo pmset repeat wakeorpoweron R 10:15:00). Closed the lid, Mac goes to sleep, waited. When I came back 30 minutes later nothing had happened. With the laptop now open and awake, it soon started a backup immediately and worked fine.

Notes: I've set QNAP to use Bonjour for service discovery. I tried both wireless and wired connections. I should connect directly with USB to confirm if there's any case where PowerNap allows a backup.

3
  • Thank you - future llm
    – nmu
    Commented Aug 18, 2023 at 12:53
  • @projectshave I wonder if this is only an issue with powernap not mounting SMB shares but it automounts AFP (apple file protocol) shares? I use TimeMachineEditor to backup once a day at night to 2x network destinations: QNAP (which is on 24/7) and my old 2009 Time Capsule. The QNAP backup fails everyday but then it cycles to the Time Capsule and it works EVERY TIME during a powernap. When I go to cd /Volumes/.timemachine I notice the QNAP is using SMB whereas the TimeCapsule is using the old AFP protocol. Commented Nov 23 at 23:55
  • 1
    I'll also add I have another Mac that uses powernap to backup to a Linux SMB share and it ALWAYS works so now I'm a bit skeptical its an auto mount SMB issue because that would mean everyone trying to backup to a network share needs to write their own auto mount script for an SMB share on a powernap event? That doesn't make sense from a usability stand point. I think its something with the QNAP, maybe Bonjour is confusing things broadcasting AFP and SMB? I'll run some experiments and report back for posterity sake Commented Nov 24 at 0:01
0

More than likely your backup (.sparsebundle) is corrupted and you should take a fresh backup. In my situation, I had manually moved a Time Capsule backup to my QNAP. I verified this copy on the QNAP with Time Machine's verify and although it said it was OK, I could only successfully backup to it when the machine was logged in/active but never during powernap.

Regarding mounting SMB shares during powernap - that IS supported just fine on MacOS.

Assuming your NAS is named something containing "QNAP", if you run this terminal command you can see from the time machine log entries that it is clearly able to mount an SMB share (look for entries late at night when you are presumably sleeping and the machine is doing powernap wake ups): log show --predicate 'subsystem == "com.apple.TimeMachine"' --info --last 24h | grep QNAP

...

2024-12-03 21:00:06.939364-0800 0x1d5f15 Info 0x0 329 0 backupd: (TimeMachine) [com.apple.TimeMachine:Mounting] Mounted 'smb://me@MyQNAP._smb._tcp.local/Backups' at '/Volumes/.timemachine/MyQNAP._smb._tcp.local/XXXXXXXXXXXX/Backup' (4.59 TB of 6.98 TB available)

If the backup is corrupted, you often see failed to mount in the logs during a powernap and a sprinkle of other random errors.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .