Time Machine stuck "Preparing backup," out of obvious fixes

My Time Machine is permanently stuck in "Preparing backup." It's on a headless Mini running background stuff, so I didn't notice until recently that it hadn't run a successful backup since April.


There's plenty of room on the (large) backup drive, and backups from our home laptops continue to be processed successfully to that same drive.


After a couple TM restarts with no progress, I decided to jettison the entire Backups.backupdb folder, empty the Trash, and try again. I ran DU on the backup drive just to ensure there was no corruption. Then I rebooted just in case there was a session corruption. The Mini came up, asked me if I wanted to establish backups to one of my two large drives (promising), I chose the correct one, and it started the backup again. (It complained that it was backing up an encrypted disk to an unencrypted disk, but I told it I didn't care.) 12 hours later, it's still "Preparing backup."


I'm running the latest Mojave (10.14.6), i7, 32GB, 500G SSD (with only 132GB used), and there are 2TB spare on the backup drive, so it's not a system capacity problem. This is a new "initial" backup, so it's not a "too long since last backup" problem. Meters show kernel_task running at about 100% (one core), and pretty much nothing else other than a small WindowServer time. Together, backupd and backupd-helper claim under a second of total CPU time used.


I've run the "D" diagnostic on the Mini, booted to the Recovery partition and run DU on the internal as well as the backup drive. Everything is sparkling clean. And TM was running fine since I got this Mini in 2018, on this same volume, until it decided just to stop in April.


I'm tempted to start blowing away TM preference files, but I'm hesitant to shoot the wrong ones. I'm also hesitant to use Pondini's website, since I don't believe he survived to see Mojave released.


Suggestions?

Mac mini 2018 or later

Posted on Sep 13, 2020 2:55 PM

Reply

Similar questions

26 replies

Sep 14, 2020 7:16 AM in response to C. D. Tavares

I understand the backup drive is directly connected to the Mini acting as your home server, and is backing up its contents and nothing else. That's perfectly ok. Let it go for a day or so, then write back.


Disk Utility isn't very good at diagnosing potentially failing hard disk drives. The most expedient way of ruling out that possibility is to substitute another drive.


In the meantime consider using the following shell script to extract potentially relevant Time Machine activity from log.


clear; printf '\e[3J' && log show --predicate 'subsystem == "com.apple.TimeMachine"' --info --last 24h | grep -F 'eMac' | grep -Fv 'etat' | awk -F']' '{print substr($0,1,19), $NF}'


Copy (triple-click to select the entire line) and Paste that line in a Terminal window. The Terminal app is in your Mac's Utilities folder.


It extracts Time Machine activity logged during the previous 24 hours. To change that time period change that value. If Time Machine is running there is no need to interrupt TM to use it. Be advised that log is fairly resource-intensive, and if you are using a portable Mac it will consume a lot of battery power as it runs.


log will need a few moments to extract the Time Machine log data. Wait for it to finish. It is normal for its results to include various "errors" and "failures" and none of them are necessarily an indication of anything wrong.


Copy (Edit > Select All and then Copy) and Paste that Terminal window's contents in a reply to this Discussion. Please omit or obscure any information that you may consider personal.


You can re-run that script as often as you like. It has no effect on TM's activity.


Quit the Terminal app when you're finished with it.



Needless to say, if you are using, or have used at any time in the past, any non-Apple "anti-virus", "cleaning", or "Internet security" products including "banking security", anything at all in that broad category of utterly useless garbage, don't. A lot of things won't work if you do.

Oct 3, 2020 11:44 AM in response to macswe

Aaaaand, of course, nothing invites a machine to crapout better than having no working backups.


Monday morning, the Mini gets in a boot loop after about an eighth inch of progress bar. Hardware diagnostics run fine. Recovery mode Disk Utility health check diagnoses the drive with scary sounding APFS structures corruptions. Godforbid Disk Utility should have enough brains to know how to fix them (that's only its job, after all), and Alsoft still doesn't have an APFS capable DiskWarrior, so that's the name of that tune. Thank you so much for APFS, Apple. (I'm thinking that earlier versions of these corruptions may have been the reason for my inability to get Time Machine operational all this time.)


Attempts to "restore" the contents of the boot drive to an external so I can reformat the external and migrate the files back later fail uniformly at the very end of the process (of course) with "APFS inverter failed to invert the volume -- Invalid argument." (Thank you, thank you, Apple.)


So I put the Mini in Transfer Disk Mode, and hooked it and the external up to another computer, and prepare to use Carbon Copy Cloner to save the contents for later migration. But wait -- the Mini has an A2 chip, so my data can be safely secured from myself! When I attempt to mount the Mini's internal, I am asked to "Enter a password to unlock the disk blahblah." But there is no way to enter anything in the password box! Absolute icing on the cake.


Since I don't expect to attract any advice for this problem in a thread whose subject is Time Machine, I have posted it separately here. But I thought I'd provide some closure to this Time Machine issue for posterity.

Sep 14, 2020 10:53 AM in response to John Galt

The only "cleaning" SW I use is when Parallels Toolbox wakes up and offers to remove nGB of old cache/logs from my system, which is a pretty respectable utility -- but in fact until I fixed it last night, my PT on this machine had been expired for years, so that's not it. The only AV I use is Malwarebytes, run only manually by hand every few months, and I've never seen it find anything but adware (and practically never anything on this machine).


The log is interesting. I discovered one of my "exclude" folders no longer existed. (The NSURLIsVolumeKey error seems to be a second symptom of the same nonexistent folder.) I removed it from my exclude list, whereupon the TM backup said "stopping." I restarted it from the menu bar icon, but the System Preferences panel never went to the "preparing" screen, yet the menu bar icon thinks a backup is running.


I don't know what the "sizing operation failed" problem is. Those folders exist, are perfectly accessible, and show perfectly good sizes in the Finder. I tried removing and reinserting them into the exclusion list, and now it just repeats the error message three times in the log for each of them instead of twice, while stuck at "Next backup: one second."


Also, I have no idea what all the "file:///" cruft in the log is. I have nothing like that in my exclude list (image).



Finally, I left the machine alone until the next time TM said a backup was due; it's now past that, and it's still showing the same screen, nothing new in the log, and the menu bar icon still thinks TM is running. (Woops, it just jumped the next backup time one hour, but didn't do anything else.)


The log from before I removed the nonexistent folder from my exclude list is in additional text (1).


Additional text (2) is the log from after that.


I'd still also like to know why kernel_task is eating up 100% of a core on an otherwise idle machine.


(Did this system blackhole my additional text entries? I can't find any way to access them.)

Sep 13, 2020 5:38 PM in response to macswe

12 hours later, it's still "Preparing backup."


Believe it or not, that's not unusual, especially for an initial backup over a network—assuming that's where the Mini resides. I have personally seen it remain in that stage for a day even under ideal network conditions.


I'd certainly let it go longer than twelve hours. Two days might be extreme though.


Refer to If a Time Machine backup takes longer than you expect.

Sep 14, 2020 3:22 PM in response to macswe

How much free space do you have on your boot drive?


Have you tired running Disk First Aid on the TM drive? Warning: it will take a much longer time to complete due to the complex ecosystem of privileges and hard links.


Do you have any files on the TM backups that you don't have on your working drive(s) that would be a hardship if you had to erase the TM drive and start over with a new, full backup?

Sep 14, 2020 3:18 PM in response to macswe

Although I would be inclined to ignore those failures, "file:///" certainly seems to be a mistake. It's not hanging on it forever so I doubt it will prevent Time Machine from eventually progressing.


Give it time. The log excerpts indicate it's working, and only appears to be stuck. It's one reason I want Apple to remove all UI from Time Machine. It doesn't help.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Time Machine stuck "Preparing backup," out of obvious fixes

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.