Add global directories directly to time machine skip list
jgoldhammer opened this issue · comments
Thanks for your great tool. Works like a charm in macOS Monterey!
I want to exclude directories like ~/.yarn-cache/ or ~/.npm/ directly from my time machine backup.
These are 2 example for folders which I want to ignore completely in backups because they make the backup slow.
I looked into rules, but it seems to error prone to do it or too verbose at the moment.
Do you want to extend the rules syntax using the searchPaths for these folders and allow to exclude these folders with a simple hint?
name: "global directories"
enabled: true
searchPaths: ["~/.yarn-cache/", "~/.npm/"]
ignorePaths: []
ruleType: "ignore-directory"
You could disable the rule by default so that the user must activate it first.
What do you think?
I believe you can already do that by running:
heptapod rules ignoreAdd ~/.npm
(or any other folder)
I agree this tool is amazing. It must get a lot more attention by the public.
I'm thinking on a new type (not rule, something similar but above the rules, I'm still looking for the name), where every entry has the following fields;
- name
- paths: []
- mode: followRules | globalIgnore | exclude
- looking for better names :)
- the idea is that we mostly want to exclude/ignore these
This would handle .npm
, .yarn
, etc. global cache/package folders.
Edit: maybe these could go inside the rules so the node rule could contain the npm, nvm, yarn folders as a list of sub things, and we could parse these separately and apply before all rules.
I think this is implemented in c3c21bd so I will close this.