Add follow options for symbolic links #3848
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In the Windows environment, the new 'follow' options allow symbolic links to be identified with a pattern.
When a symbolic link matches the pattern, restic will backup the link destination rather than the link itself.
The 'follow' options code is modelled after the 'exclude' options.
What does this PR change? What problem does it solve?
Under Windows, restic does not currently back up folders linked to by symbolic links.
This change allows users to select symbolic links by pattern matches (in an identical fashion with -exclude). Any symbolic link encountered will be compared with the patterns. If they match, then rather than looking at the symbolic link, restic will look at the underlying folder instead.
The default processing of restic does not change and unless these options are used, symbolic links will still be ignored.
Was the change previously discussed in an issue or on the forum?
#3594
#3594
Checklist
changelog/unreleased/
that describes the changes for our users (see template).gofmt
on the code in all commits.