I'm having problems clearing our a backup drive. I want to get rid of a couple large files so I can preserve the other incremental backups.
I can't use the tmutil delete command on entire backups since I'd lose all files from that interval and not just the offending file I want to purge. Additionally, having a script would mean I could recover space from a whole lab's worth of computers by scripting this from the command line. I also expect that script would let me discover which file in the package the GUI is refusing to prune since I can debug a script easier than I can Finder and the Time Machine interface.
In case this is a simple permissions issue - the library package file/folder:
Mac:~ bmike$ ls -laeO /Volumes/Backups/Backups.backupdb/Mac/2015-04-09-072338/Macintosh\ HD/Users/bmike/Pictures/Photos\ Library.photoslibrary
total 0
drwxr-xr-x@ 10 bmike staff - 340 Apr 8 20:05 .
0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
drwx------@ 28 bmike staff - 952 Apr 9 09:38 ..
0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
1: group:everyone deny delete
drwxr-xr-x+ 2 bmike staff - 68 Apr 8 09:07 Attachments
0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
drwxr-xr-x+ 2 bmike staff - 68 Apr 8 09:07 Masks
0: group:everyone deny add_file,delete,add_subdirectory,delete_child,writeattr,writeextattr,chown
When I use the Time Machine interface, it errors out and I don't know which file or instance has errors:
I'm looking for a way to delete these protected files from all backup intervals in a similar manner to the Finder Gear icon action of Delete All Backups of "Photos Library"
Is this selective pruning of a file/folder possible across all time intervals with Apple's built in tools, a custom script and/or other tool?
rm
? Something likesudo rm -rf /Volumes/Backups/Backups.backupdb/Mac/*/Macintosh\ HD/Users/bmike/Pictures/Photos\ Library.photoslibrary
. It might be painfully slow, but it should work. If you need to something more sophisticated than justrm
you can usefind ... -exec
.rm
and shell globbing an easy win.bypass
as I only now see you found and linked to? If that worked, please post a quick answer to this question so it is easier to find. Took me 20 minutes. :-)