9

I have recently switched to a newer MBP from a TM backup. Unfortunately something seems to have gone wrong during the migration. TM cannot complete a backup, it just keep accumulating into a directory, with .inProgress suffix.

After a bit googling I found this answer, which suggests removing the folder by moving it to the Trash. That doesn't really work as it just says Removing files, but there is literally no progress after hours. I tried to remove the folder from the terminal, that's a no go due to Permission Denied.

I tried to change to a admin account, then do a sudo rm -rf and that results in Operation Not Permitted. Do I need to disable csrutils just to be able to repair a stalled backup?

Suggestions?

3
  • 1
    Does tmutil listbackups show that backup's timestamp? Are you able to tmutil delete /path/to/backup.inProgress?
    – grg
    Jun 8, 2017 at 16:10
  • Use the hidden command tmutil status and post back what you get, assuming the backup is currently running. Jun 9, 2017 at 1:10
  • @grgarside that works thank you.. If you put it down as an answer I'll accept it
    – posdef
    Jun 14, 2017 at 15:07

3 Answers 3

13

tmutil listbackups shows you a list of the backups found on your Time Machine disk.
To delete a backup shown in this list, run

tmutil delete /path/to/backup.inProgress
3
  • 1
    whats the difference between this and sudo rm -rf /path/to/backup.inProgress?
    – JBis
    Sep 1, 2018 at 3:17
  • @JBis Firstly, rm won’t work because of SIP-like restrictions: only Time Machine can make changes to its backups. Secondly, I don’t know how much of a mess that makes with the hard links that TM uses in its backups. Third, if TM is backing up to it and you pull the folder out from underneath it without telling it and giving it a chance to stop write operations and remove the backup from its index, I don’t know how much of a mess that would make too.
    – grg
    Sep 1, 2018 at 8:04
  • Ok I guess its just safer. P.S. rm won't delete the hard links take a look at this great answer → unix.stackexchange.com/a/50188/267377.
    – JBis
    Sep 1, 2018 at 15:00
1

The only safe way to delete time machine files is to use tmutil (as explained in grg's answer). Using sudo rm -rf will seriously damage your backups. This is because time machine uses hard links to directories. Hard links to files are safe to delete. But a recursive delete of a hard link to a directory will actually delete the directory contents. So your partial backup may contain a hard link to an unchanged directory used in a previous backup. Deleting that hard link alone wouldn't cause damage, because your previous backup has its own hard link to the directory. But those two hard links point to the same directory, so when you do a recursive delete of the contents, you're actually deleting the contents of the directory that your previous backup was using. So now you've ruined your previous backup (and perhaps many previous backups). There's a reason why Backups.backupdb is locked down.

0

There is a command

tmutil deleteinprogress <machine_directory>

From man page:

Delete all in-progress backups for a machine directory. Requires root and Full Disk Access privileges. On APFS backup destinations, this reverts the destination volume to the last backup.

1
  • what do you put for machine_directory?
    – malhal
    Nov 12 at 16:05

You must log in to answer this question.

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