tmutil - time machine utility
tmutil - time machine utility
see also:
remove time machine exclusion
tmutil removeexclusion /path/to/directory # or filebulk remove time machine exclusions
example: for some reason, I had a long list of files excluded which were stored in my iCloud Drive, and I didn’t know why. the files contained spaces as well and need to be treated differently.
- find all files which are excluded by time machine, I’m filtering the files which are stored in iCloud Drive (apple’s great name for this folder is
com~apple~CloudDocs) - change the
IFSvariable to not treat spaces as an input separator, but rather newlines - iterate through the files (check the output file before doing this) and remove the time machine exclusion entry for entry
sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"|rg "com~apple~CloudDocs" > $TMPDIR/exclude.txt
IFS=$'\n'
for i in $(cat $TMPDIR/exclude.txt); do tmutil removeexclusion "$i";done