Tuesday, October 17, 2017

How iCloud Drive Can Break Time Machine Backups

Howard Oakley:

So the error which was breaking these attempts to back up was the result of a source file having the same name as a file which had already been backed up on that occasion – something which should be impossible in HFS+, which does not permit two files in the same folder to have the same name and version. However, in this case the file causing the problem is not stored locally on an HFS+ volume, but in the user’s iCloud Drive, which is reported as ~/Library/Mobile Documents/.

I have no idea as to whether that particular file has a problem, but there is nothing that the user or I can do to fix issues like this in iCloud Drive. The best workaround, then, is for them to add iCloud Drive to their Time Machine exclusion list, using the Time Machine pane.


One possible explanation of this problem is that the files causing the errors have been written to iCloud Drive from iOS running case-sensitive APFS, and that iCloud Drive has not enforced compatibility with HFS+ naming. This would then mean that Time Machine’s backup would try to write two files with case-insensitive names which were deemed to be identical.

Presumably, case-sensitive HFS+ on iOS could cause the same problem. Assuming that Time Machine is copying the locally cached iCloud Drive files, and not directly accessing iCloud Drive, I don’t understand how the “duplicate” files ended up in his home folder, though, unless he’s not using regular case-insensitive HFS+ (or APFS).

2 Comments RSS · Twitter

I don't use iCloud drive, so this is a blind guess: Could it be that the iCloud folder is mounted under its own file system, so that ~/Library/Mobile Documents/ is a mount point, under which a case-sensitive FS lives, instead of it being just another folder on the root ("/") fs?

@Thomas I was wondering about that, but as far as I can tell it’s not its own file system, and it behaves as case-insensitive from Finder and Terminal.

Leave a Comment