Files
restic/changelog/unreleased/issue-5767
T
Michael Eischer 02cf8e5f23 backup: prevent exclude of backup targets
Track backup targets explicitly specified by the user and prevent
excluding them. This for example ensures that `restic backup
--exclude-if-present .git /home/user/data` backs up the `data` folder
even if there is a `.git` folder in `/home/user`.

Note that this does not suffice for commands like `restic backup --exclude data /home/user/data`
as the exclude pattern will still match every single file within `data`.
2026-05-30 22:30:30 +02:00

15 lines
730 B
Plaintext

Change: Prevent excluding paths explicitly passed to `backup`
When `restic backup --exclude-if-present .git /home/user/data` was run and
`/home/user/.git` existed, restic excluded the `data` directory from the
snapshot. The same applied to `--exclude-caches` or `--one-file-system`. Similarly,
`restic backup --exclude-larger-than 1M large-file.bin` produced an empty
snapshot when the file was larger than one megabyte.
The `backup` command now tracks which files and directories were specified on
the command line and does not apply excludes to those paths. Content inside a
backed-up directory is still filtered by excludes as before.
https://github.com/restic/restic/issues/5767
https://github.com/restic/restic/pull/21797