10

I have an external USB drive to which I have been doing my Time Machine Backups for about 5 years now. Recently, it started refusing to complete the backup.

When I connect the drive and choose to create a backup, it either:

  1. Stay in "Preparing backup" state for a long time and then goes back to idle (does not start the backup at all)
  2. Starts the backup, after a couple of GBs it goes back to idle (as if nothing happened)

I tried scanning the disk with fsck, which reported everything being fine. I have also tried multiple other solutions, icluding removing the .inProgress file and rebooting the mac (this one looked promising, started preparing the backup and ran for about 5/30 GB, only to stop "back to idle" then).

I do see my previous backups listed on the disk with Time Machine, just creating the new ones seems to be a problem. It should not be disk space, as there is 250GB available (and the entire Mac's disk is 64 gigs).

After the backup fails, I see in its log:

    Copying items from "Macintosh HD" (device: /dev/disk1s1 mount: '/' fsUUID: 031D3803-B01C-3414-9912-9C615E0AE313 eventDBUUID: C58D9E07-C0C6-44F6-B27F-522C5C3895A7)
 26 c :ERROR:-128, copy /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/namehere/2017-11-05-133152/Macintosh HD to /Volumes/Time Machine/Backups.backupdb/namehere/2017-11-05-133153.inProgress/FB9A54C7-8DC5-401C-ABE0-7131A79EF624
 Finished copying items for "Macintosh HD" (device: /dev/disk1s1 mount: '/' fsUUID: 031D3803-B01C-3414-9912-9C615E0AE313 eventDBUUID: C58D9E07-C0C6-44F6-B27F-522C5C38    95A7)
 Time elapsed: 22 minutes, 58.000 seconds
         Copied 180065 items (5.69 GB)
         Copy stage canceled

 Backup canceled.
 Total time elapsed: 44 minutes, 26.000 seconds

After the first retry, the log looked similar (this time copied about 3 GB). Finally, trying to run the backup once again, resulted in the following log:

Running preflight for "Macintosh HD" (device: /dev/disk1s1 mount: '/' fsUUID: 031D3803-B01C-3414-9912-9C615E0AE313 eventDBUUID: C58D9E07-C0C6-44F6-B27F-522C5C3895A7)    
        Scanning nodes needing deep traversal                                                                                                                            
        Deep event scan at path: /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/namehere/2017-11-05-191243/Macintosh HD reason:must scan subdirs|new event db|                                                                                                                                                                             Calculating size of changes                                                                                                                                      
        Backup canceled during preflight.                                                                                                                                
        Should copy 0 items (0 KB) representing 0 blocks of size 4096. 49066159 blocks available.                                                                        
Preflight complete for "Macintosh HD" (device: /dev/disk1s1 mount: '/' fsUUID: 031D3803-B01C-3414-9912-9C615E0AE313 eventDBUUID: C58D9E07-C0C6-44F6-B27F-522C5C3895A7)   
Time elapsed: 2 minutes, 28.000 seconds                                                                                                                                                                                                                                                                                                           
Backup canceled.                                                                                                                                                         
Total time elapsed: 2 minutes, 31.000 seconds

In Console logs, I see:

17:01:34.124199 +0100   powerd  Process backupd.624 TurnedOff BackgroundTask "Time Machine backup" age:00:16:03  id:47244673428 [System: PrevIdle DeclUser kDisp]
17:01:34.126417 +0100   powerd  Process backupd.624 TurnedOff PreventUserIdleSystemSleep "Time Machine backup" age:00:16:03  id:4295000469 [System: PrevIdle DeclUser kDisp]

20:55:21.690979 +0100   backupd Claim 954EE5FE-C4AA-481E-8DE2-3B7462EEFDF5 was revoked
20:55:25.099189 +0100   backupd Failed to unmount disk mounted at '/Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/namehere/2017-11-13-202006/Macintosh HD', error: {
    Action = Unmount;
    Target = "file:///Volumes/com.apple.TimeMachine.localsnapshots/Backups.backupdb/namehere/2017-11-13-202006/Macintosh%20HD";
}
20:55:25.101240 +0100   backupd Failed to unmount snapshot: com.apple.TimeMachine.2017-11-13-202006 source: Macintosh HD
20:55:25.376956 +0100   powerd  Process backupd.257 TurnedOff BackgroundTask "Time Machine backup" age:00:35:41  id:47244673059 [System: PrevIdle DeclUser kDisp]
20:55:25.378105 +0100   powerd  Process backupd.257 TurnedOff PreventUserIdleSystemSleep "Time Machine backup" age:00:35:41  id:4295000100 [System: PrevIdle DeclUser kDisp]
20:55:42.788218 +0100   backupd Received claim 70B146B7-2002-4C35-B235-F23A6F07EAD7
20:55:42.789623 +0100   backupd Claim 70B146B7-2002-4C35-B235-F23A6F07EAD7 granted in server
20:55:42.789715 +0100   backupd Claim 70B146B7-2002-4C35-B235-F23A6F07EAD7 invoked in server

It seems that Time Machine fails to unmount a local snapshot?

I have tried running backup in safe mode, but with no results either. What could I do to complete a backup again?

8
  • Anything in the system logs (On why the backup was canceled)? Commented Nov 5, 2017 at 19:23
  • @user2707001 Trying to find some, but not really know what I am looking for. Nothing obvious, nothing with "time machine" (case insensitive) or "backup".
    – 3yakuya
    Commented Nov 7, 2017 at 11:34
  • Could you read discussions.apple.com/thread/6044020?start=0&tstart=0 and post the relevant information? Commented Nov 8, 2017 at 9:23
  • (Try to do backup in safe mode, disconnect additional drives, guide on how to post relevant system log entries in essence) Commented Nov 8, 2017 at 9:26
  • @user2707001 added some logs from the console from the time the backup stops. Please let me know if I am looking for anything in particular.
    – 3yakuya
    Commented Nov 13, 2017 at 16:09

2 Answers 2

8

I guess that TimeMachine cannot unmount its snapshot, tries only once, and cancels the backup. If it happens, try to identify your mounted disk (e.g. /Volumes/com.apple.TimeMachine.localsnapshots/Backups.backup‌​db/namehere/2017-11-‌​13-202006/Macintosh HD) and then do

sudo lsof /Volumes/<Your Disk> 

and see which process interferes.

You could also just guess at Spotlight being responsible and disable it before you run the backup using

sudo mdutil -i off /path_to_volume

or completely

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
4
  • The problem is: once the backup fails my local snapshots are gone from /Volumes :( I have not tried looking for then in /dev yet, but I basically do not see anything mounted once Time Machnie fails.
    – 3yakuya
    Commented Nov 14, 2017 at 16:58
  • Switching off the Spotlight apparently did the trick. Thanks!
    – 3yakuya
    Commented Nov 14, 2017 at 18:05
  • 2
    You're welcome. Apple, you have a software quality problem, as I have repeatedly said before regarding iTunes, but also regarding Time Machine. Commented Nov 15, 2017 at 16:13
  • My TimeMachine backups to an external drive are also failing silently, even after disabling Spotlight via sudo mdutil (tho lsof still shows lots of processes accessing my /Volumes/TimeMachine) The drive is health and hs plenty of space. I recently upgraded to High Sierra. Are there other options to try? What console.app logs should I check to see what's wrong?
    – djb
    Commented Dec 13, 2017 at 2:06
6

I have the same problem after updating to OS 10.13.2

Turning off Spotlight with

sudo mdutil -a -i off

allowed the Time Machine backup to finish.

I then turned Spotlight on again with

sudo mdutil -a -i on

I hope the next OS update fixes this but.

1
  • Careful with using the -a flag as that makes the command apply to all volumes. If you have network or external drives connected, that might not be what you want. I'd recommend doing mdutil -sa first and then turning on Spotlight indexing for each volume that you want with mdutil -i on /Volumes/external_storage, etc. Commented Mar 31, 2019 at 14:05

You must log in to answer this question.

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