MacOS – Time Machine Backups Gets Stuck With 100% CPU via tmutil

macosterminaltime-machine

Okay, so I recently decided to try switching my Time Machine backups over to tmutil so that I could gain more control over exactly when they ran, but also so I could run some extra stuff before and after.

Anyway, I decided to start with a simple test with a launch agent set to run the following command once an hour:

tmutil --block

I'm using the --block option to make sure job remains visibly active till the backup is done, and because I'll need it if I want to run commands afterwards. The problem I'm having however is that when the backup gets into the Finishing stage at the end, it's frequently getting stuck with backupd ramping up to 100% CPU utilisation.

Stopping the backup and running with "Backup Now" from Time Machine's menu will work normally, and returning to regular Time Machine automatic backups works just fine without ever doing this.

It's only when using tmutil --block that this seems to happen, any ideas as to why?

Best Answer

I had a feeling I might have posted this too soon; just had Time Machine's normal backup do the same thing.

However, the culprit I discovered was that somehow I had a .inprogress backup that was older than the most recent backup (in fact there'd been five or six successful backups since). No idea how it got there, but sudo tmutil delete <path to .inprogress file> solved the problem.

I'm not sure if I'll mark this as the correct answer or not, as I still have no idea how I ended up with a leftover .inprogress file, or why it only started causing problems when it did, or why it didn't always affect automatic backups…