Skip to content

Instantly share code, notes, and snippets.

@E-VANCE
Forked from nickcernis/readme.md
Created June 2, 2021 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save E-VANCE/118887c6c105508c03d2f69eecae9e55 to your computer and use it in GitHub Desktop.
Save E-VANCE/118887c6c105508c03d2f69eecae9e55 to your computer and use it in GitHub Desktop.
Exclude node_modules and .git from Backblaze backups on Mac

Exclude node_modules and .git from Backblaze backups on Mac

  1. Edit the file at /Library/Backblaze.bzpkg/bzdata/bzexcluderules_editable.xml.
  2. Add these rules 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="*" />
<excludefname_rule plat="mac" osVers="*"  ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" 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