While looking at the log files for Time Machine, I realized that the previous backups were not being deleted due to an error with a single file:
2023-07-16 05:50:29.434071-0700 [BackupThinning] Deleted incomplete backup '/Volumes/Backups/2023-07-15-074409.previous' 2023-07-16 05:50:29.557540-0700 [BackupDeletion] Failed to unlink item '/Volumes/Backups/2023-07-15-120039.previous/Data/Users/xxx/Library/CloudStorage/[email protected]/My Drive', error: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"
I do not understand what is wrong with this link in particular. It was created by Google Drive. I uninstalled, deleted the entire
[email protected] folder then reinstalled Google Drive and it is the exact same issue.
> cd ~/Library/CloudStorage/[email protected] > ls -la ... lr-x------@ 1 xxx staff 24 Jul 16 05:44 My Drive@ -> /Users/xxx/My Drive > cd /Volumes/Backups/2023-07-15-120039.previous/Data/Users/xxx/Library/CloudStorage/[email protected] > ls -la lr-x------@ 1 xxx staff 24 Jul 15 09:29 My Drive@ -> /Users/xxx/My Drive > rm -f "My Drive" rm: My Drive: Operation not permitted
The only thing that seems to work is to issue a manual
sudo rm -f "My Drive".
Any idea what is wrong with the link that Google Drive creates that cannot be deleted by Time Machine and what to do to fix it?