Skip to content

Instantly share code, notes, and snippets.

@squatto
Forked from nickcernis/readme.md
Created February 12, 2019 21:57
Show Gist options
  • Save squatto/4b650d2ab8c6cb26dd5794db58839258 to your computer and use it in GitHub Desktop.
Save squatto/4b650d2ab8c6cb26dd5794db58839258 to your computer and use it in GitHub Desktop.
Exclude node_modules from Backblaze backups on Mac

Exclude node_modules from Backblaze backups on Mac

  1. Edit the file at /Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml.
  2. Add this rule inside the bzexclusions tag:
<!-- Exclude node_modules. -->
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/node_modules/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />

Notes

It can take one to eight hours before new files are backed up. If you want to test this has worked, best to wait a day or so. https://help.backblaze.com/hc/en-us/articles/217665498-Why-hasn-t-Backblaze-backed-up-my-new-files-yet-

Adding this rule does not appear to remove existing node_modules folders that have already backed up. Options to delete existing node_modules folders are here: https://help.backblaze.com/hc/en-us/articles/217666658-How-can-I-delete-files-that-have-already-been-uploaded-

You may wish to also exclude .git folders with the extra exclusion rules described here: https://gist.github.com/jb510/7f52f0f4c13020b56e30ac72eb733efb

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment