Skip to content

Instantly share code, notes, and snippets.

@jsonmaur
Last active January 23, 2024 22:32
Show Gist options
  • Star 32 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jsonmaur/9a2b28dfbbfa8f2548dc84fc232d4f59 to your computer and use it in GitHub Desktop.
Save jsonmaur/9a2b28dfbbfa8f2548dc84fc232d4f59 to your computer and use it in GitHub Desktop.
Backblaze Custom Exclude
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/.git/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<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="/_build/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
<excludefname_rule plat="mac" osVers="*" ruleIsOptional="t" skipFirstCharThenStartsWith="users/" contains_1="/deps/" contains_2="*" doesNotContain="*" endsWith="*" hasFileExtension="*" />
@jsonmaur
Copy link
Author

jsonmaur commented Dec 2, 2017

In /Library/Backblaze.bzpkg/bzdata

@Jarrid
Copy link

Jarrid commented Jan 21, 2018

This is awesome.
For anyone wondering how to get into the .bzpkg folder, the user needs to:
Go to the root Library folder, right-click the Backblaze.bzpkg , and click “Show Package Contents”

@celsowhite
Copy link

@jsonmaur thanks for this. Do you know if I need to restart backblaze or re-source this xml file for the new excludes to take effect? My backblaze is still backing up node_modules even though I have the exclude rules setup.

@sn6x
Copy link

sn6x commented Sep 19, 2018

@celsowhite: Each line is lacking contains_2="*" property, therefore is invalid (as per Backlaze's docs)

Rule 3: An excludefname_rule must specify all criteria. Use "*" to skip criteria.

For each line to be valid, all of the properties below must be specified:

  • plat
  • osVers
  • ruleIsOptional
  • skipFirstCharThenStartsWith
  • contains_1
  • contains_2
  • doesNotContain
  • endsWith
  • hasFileExtension

@jsonmaur
Copy link
Author

Thanks for the info @knikel. Looks like they updated their format since I set this up--those values weren't required before. I'll make the necessary changes.

@floer32
Copy link

floer32 commented Oct 8, 2019

Thank you!

@Svish
Copy link

Svish commented Oct 8, 2019

With skipFirstCharThenStartsWith="users/", that would mean it only works for files under /users/?

@jsonmaur
Copy link
Author

jsonmaur commented Oct 9, 2019

@Svish Yes I believe so. The article linked in my first comment briefly mentions that it improves performance.

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