Ignore node_modules and git Folders in BackBlaze

Backblaze Logo

Backblaze is my backup provider of choice. Backblaze was founded by ex-Apple engineers. As a result, the application is very native to Mac. One problem I’ve always had with my backup solutions is backing up the folders that are completely useless. This includes node_modules, .git and vendor folders.

Backblaze does not have a way to ignore a folder name through their UI. However, you can edit a file directly to have it ignore any folder and/or file matches you wish.

There is a file located in /Library/Backblaze.bzpkg/bzdata/ called bzexcluderules_editable.xml Open this file in your favourite text editor of choice and add the following lines:

<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="*" />

You can change containts_1 directive to any folder structure you wish to be ignored. Your backups are now going to run much faster and take a much shorter time to complete.

Leave a Reply

Your email address will not be published. Required fields are marked *