Troubles with 'exclude_from:' #207

Closed
opened 2019-08-23 12:01:08 +00:00 by predmijat · 3 comments

What I'm trying to do and why

Supply list of exclude patterns from a file

Steps to reproduce (if a bug)

exclude_from:
    - /root/borg/common-exclude
$ cat /root/borg/common-exclude
R /
- /var/www/vhosts/*/httpdocs/wp-content/cache/*
(... some other stuff )

Actual behavior (if a bug)

-rw-r--r-- websiteuser websitegroup 39961 Fri, 2019-08-23 08:36:47 var/www/vhosts/website.com/httpdocs/wp-content/cache/db/singletables/27c/438/27c43859676cb64159242c6f5a0c9276.php is being backed up

Expected behavior (if a bug)

it shouldn't back up patterns found in common-exclude file

Other notes / implementation ideas

Environment

borgmatic version: 1.3.12

borgmatic installation method: pip

Borg version: borg 1.1.9

Python version: Python 3.6.8

operating system and version: CentOS 7

Please tell me what am I missing :)


EDIT: so it looks like it doesn't like - when it's in the file :)

#### What I'm trying to do and why Supply list of exclude patterns from a file #### Steps to reproduce (if a bug) ``` exclude_from: - /root/borg/common-exclude ``` ``` $ cat /root/borg/common-exclude R / - /var/www/vhosts/*/httpdocs/wp-content/cache/* (... some other stuff ) ``` #### Actual behavior (if a bug) `-rw-r--r-- websiteuser websitegroup 39961 Fri, 2019-08-23 08:36:47 var/www/vhosts/website.com/httpdocs/wp-content/cache/db/singletables/27c/438/27c43859676cb64159242c6f5a0c9276.php` is being backed up #### Expected behavior (if a bug) it shouldn't back up patterns found in common-exclude file #### Other notes / implementation ideas #### Environment **borgmatic version:** 1.3.12 **borgmatic installation method:** pip **Borg version:** borg 1.1.9 **Python version:** Python 3.6.8 **operating system and version:** CentOS 7 Please tell me what am I missing :) ---- EDIT: so it looks like it doesn't like `-` when it's in the file :)
Owner

Thanks for filing this! I think the problem may be that you're using the Borg "patterns" format instead of the expected Borg "excludes" format. So you've got two options:

  • Switch from using borgmatic's excludes_from to patterns_from. That way, it'll be able to consume your existing patterns file.
  • Or, continue using excludes_from and rewrite your excludes file to be of the expected format. That format is just a series of paths to exclude, no - prefix and no R /.

Let me know if either of those does the trick!

Thanks for filing this! I think the problem may be that you're using the Borg "patterns" format instead of the expected Borg "excludes" format. So you've got two options: * Switch from using borgmatic's `excludes_from` to `patterns_from`. That way, it'll be able to consume your existing patterns file. * Or, continue using `excludes_from` and rewrite your excludes file to be of the expected format. That format is just a series of paths to exclude, no `- ` prefix and no `R /`. Let me know if either of those does the trick!
witten added the
question / support
label 2019-08-23 17:40:03 +00:00
Author

Thanks for the detailed explanation :)
Problem solved.

Thanks for the detailed explanation :) Problem solved.
Owner

Glad to hear it!

Glad to hear it!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: borgmatic-collective/borgmatic#207
No description provided.