restic/doc
Vincent Bernat 2ee07ded2b filter: ability to use negative patterns
This is quite similar to gitignore. If a pattern is suffixed by an
exclamation mark and match a file that was previously matched by a
regular pattern, the match is cancelled. Notably, this can be used
with `--exclude-file` to cancel the exclusion of some files.

Like for gitignore, once a directory is excluded, it is not possible
to include files inside the directory. For example, a user wanting to
only keep `*.c` in some directory should not use:

    ~/work
    !~/work/*.c

But:

    ~/work/*
    !~/work/*.c

I didn't write documentation or changelog entry. I would like to get
feedback if this is the right approach for excluding/including files
at will for backups. I use something like this as an exclude file to
backup my home:

    $HOME/**/*
    !$HOME/Documents
    !$HOME/code
    !$HOME/.emacs.d
    !$HOME/games
    # [...]
    node_modules
    *~
    *.o
    *.lo
    *.pyc
    # [...]
    $HOME/code/linux/*
    !$HOME/code/linux/.git
    # [...]

There are some limitations for this change:

 - Patterns are not mixed accross methods: patterns from file are
   handled first and if a file is excluded with this method, it's not
   possible to reinclude it with `--exclude !something`.

 - Patterns starting with `!` are now interpreted as a negative
   pattern. I don't think anyone was relying on that.

 - The whole list of patterns is walked for each match. We may
   optimize later by exiting early if we know no pattern is starting
   with `!`.

Fix #233
2022-03-20 13:33:08 +01:00
..
_static docs: switch to gopher favicon 2020-02-13 00:09:37 +01:00
images/aws_s3 Update AWS S3 tutorial, fixing #1593 2018-01-29 20:47:27 +01:00
logo Update logo 2018-02-05 20:48:48 +01:00
man Update manpages and auto-completion 2021-08-03 11:45:36 +02:00
.gitignore Document the build and release processes 2018-10-13 13:48:03 +02:00
010_introduction.rst Update docs 2018-04-28 22:08:11 +02:00
020_installation.rst [#issue 3127] Add xattr support for Solaris 2022-02-13 14:24:37 +05:30
030_preparing_a_new_repo.rst doc: Fix block quote warning 2022-03-06 18:15:55 +01:00
040_backup.rst filter: ability to use negative patterns 2022-03-20 13:33:08 +01:00
045_working_with_repos.rst [#issue 3490] Support for specifying file size in read-data-subset 2021-11-02 15:25:46 +05:30
050_restore.rst mount: Improve usage information when mounted 2021-11-01 20:59:20 +01:00
060_forget.rst Add missing colon in prune stats output and change padding to 14 chars to align the fields 2022-01-06 21:15:15 +00:00
070_encryption.rst Update docs 2018-04-28 22:08:11 +02:00
075_scripting.rst Update docs 2018-04-28 22:08:11 +02:00
080_examples.rst Use S3's proper product name, Amazon S3 2021-11-13 22:21:06 +01:00
090_participating.rst docs: Fix link to "help wanted" issues 2021-11-16 00:03:34 +00:00
100_references.rst doc: Split references out into smaller files 2018-06-18 22:17:48 +02:00
110_talks.rst Update docs 2018-04-28 22:08:11 +02:00
Makefile Document the build and release processes 2018-10-13 13:48:03 +02:00
REST_backend.rst doc: Split references out into smaller files 2018-06-18 22:17:48 +02:00
bash-completion.sh Update manpages and auto-completion 2021-08-03 11:45:36 +02:00
cache.rst Systematize documentation of environment variables 2020-10-22 09:57:30 +02:00
conf.py Update docs 2018-04-28 22:08:11 +02:00
design.rst Use S3's proper product name, Amazon S3 2021-11-13 22:21:06 +01:00
developer_information.rst Update instructions for reproducing build 2021-09-12 09:02:57 -07:00
faq.rst Update output of restic check 2022-01-16 12:34:20 +01:00
fish-completion.fish Update manpages and auto-completion 2021-08-03 11:45:36 +02:00
index.rst doc: Add developer information 2018-10-11 22:37:25 +02:00
manual_rest.rst Add --insecure-tls flag to disable SSL cert verification 2021-09-21 10:52:40 -04:00
requirements.txt Documentation: Refactor and switch to Sphinx 2017-04-17 20:53:38 +02:00
test_irreducibility.gap chunker: Require a random irreducible polynomial 2015-04-05 22:52:43 +02:00
zsh-completion.zsh Update manpages and auto-completion 2021-08-03 11:45:36 +02:00