Skip to content

Add support for pattern prefix for the whole file with --exclude-from #1613

Description

@blueyed

Given that you have a list of regular expression patterns already (e.g. used with "bup"), it would be helpful if --exclude-from re:/etc/backup-exclude-bup.txt would work, i.e. consider all patterns in the file to have a re: prefix.

I've used the following Vim commands to convert the list manually:

:%s/^\ze[^#]/re:/gc
" borg does not like a / at the end before $ to exclude dirs?!
:%s~/\$~\$~gc

Activity

  1. ThomasWaldmann commented on Mar 22, 2017

    @ThomasWaldmann
    Member

    something similar was recently added for the new --patterns-from, one can switch the pattern style within the file.

  2. ThomasWaldmann commented on Oct 5, 2026

    @ThomasWaldmann
    Member

    Closing, guess this can be just done using --patterns-from.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cmd: createpatternspattern matching, include, exclude, ...

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions