Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: ignore files excluded by timemachine files #1074

Open
ibash opened this issue Feb 19, 2024 · 4 comments
Open

Feature request: ignore files excluded by timemachine files #1074

ibash opened this issue Feb 19, 2024 · 4 comments
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR

Comments

@ibash
Copy link

ibash commented Feb 19, 2024

As a mac user I use time machine backups. It'd be great if rustic was able to ignore files I have already ignored in my time machine plist.

Currently I use restic backups and have a wrapper script that produces an excludes.txt with these files. There are two sources of files ignored by time machine:

  1. Parse out SkipPaths from the plist located at /Library/Preferences/com.apple.TimeMachine.plist
  2. Looking at per-file metadata: sudo mdfind "com_apple_backup_excludeItem = 'com.apple.backupd'"
@github-actions github-actions bot added the S-triage Status: Waiting for a maintainer to triage this issue/PR label Feb 19, 2024
@kapitainsky
Copy link
Contributor

kapitainsky commented Feb 19, 2024

I am afraid it is not so simple... your wrapper is missing a lot. You only include your explicit TM exclusions + 3rd parties software indications what to exclude. You are missing entirely macOS default exclusions. With your approach your backup most likely includes such red herrings as ~/Library/Caches

Have a look at my post here:

https://forum.restic.net/t/exclude-patterns-for-caches/7219/5

Also I do not think it should be rustic problem - it is platform specific issue. rustic should not worry about what and how some Apple software (Time Machine) is doing - especially that it is not documented by Apple itself. As what next? Should rustic be aware of any other backup software? You want to maintain it?

Or talk to Apple - ask them to document how to get TM exclusions - then it should be easy to create wrapper or maybe consider some macOS specific rustic behaviour. Without, it is pointless even to try - unless you volunteer to reverse engineer TM behaviour and maintain it moving forward. My approach in link included is simply based on poking around - no help from any official sources. So it might be not perfect neither - but it is the best I managed to figure out.

@ibash
Copy link
Author

ibash commented Mar 19, 2024

oo thanks @kapitainsky

It wouldn't need to belong in rustic, maybe there's room for a small utility program to generate exclusion lists.

@kapitainsky
Copy link
Contributor

100% agree. macOS users will love it. Hopefully somebody will write it one day.

@ibash
Copy link
Author

ibash commented Apr 7, 2024

Now that I'm actually working on switching to rustic, would love to exclude by the com_apple_backup_excludeItem attribute. This is something duplicacy supports and would catch a lot of things :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-triage Status: Waiting for a maintainer to triage this issue/PR
Projects
None yet
Development

No branches or pull requests

2 participants