borgbackup / borgbackup/borg

Add previously excluded parent directories of --patterns includes to the archive

Open
#2,438 0 comments 0 reactions 0 assignees View on GitHub
patterns
Dominant language
Python
Stars
13.7k
Forks
875
Avg merge
11h 15m
Merged PRs (30d)
192

Description

> if the code recurses into an excluded dir (searching for stuff that is included again in directories deeper below),
> it does not archive the intermediate directories, so we won't have their metadata (like uid/gid/mode/...) in the archive.

Directories must be ordered, so a/ must come before a/b, if both exist.

**Discuss:** A similar issue exists iirc when running `borg create ... foo/bar/baz`; Directories foo/ and foo/bar/ will not be included. I believe tar, whose general behaviour and design borg more or less follows, does. This part would be a 1.1.x only change.

**Task:** When recursing into non-recurse-excluded dirs, build a FIFO buffer of directories which have been recursed into but excluded from the archive. If a file is included in a directory, the buffer is fed into `process_dir` and cleared.

**See also:** #2322

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.