Skip to content

Excluding / doesn't work with --patterns-from #2314

@edgimar

Description

@edgimar

In issue #1406 the patterns file format which was chosen should allow something like the following to work, if I'm not mistaken:

+ /home/foo/bar/**
+ /etc/**
- /**

This should backup the contents of /home/foo/bar and /etc, and nothing else on the filesystem. Presently using a patterns file like this results in no files getting selected at all. Regardless of whether it make sense to have a patterns file like this (some might argue that two roots should be specified on the command-line, but there are use-cases when it is preferable to have just a single root of /), the above should still work.

For the record, I am using borg (1.1.0b4.dev223+ng10d4c97c) from the command-line as follows:

borg-backup create --exclude-if-present .nobackup --keep-exclude-tags --patterns-from patt_file backupserver:/home/backupuser/backups/borgrepo::myarchive /

Backing up without the --patterns-from option works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions