Have you checked borgbackup docs, FAQ, and open GitHub issues?
Yes
Is this a BUG / ISSUE report or a QUESTION?
Issue
System information. For client/server mode post info for both machines.
Your borg version (borg -V).
Git repository master branch, 1.2.4 and probably all recent-ish versions
Operating system (distribution) and version.
Any
Hardware / network configuration, and filesystems used.
/
How much data is handled by borg?
/
Full borg commandline that lead to the problem (leave away excludes and passwords)
Describe the problem you're observing.
Borg has a built-in protection against repository relocation, which can be disabled with the BORG_RELOCATED_REPO_ACCESS_IS_OK environment variable. This check, however, serves security purposes; if possible, it is better not to disable it.
On backup servers, I often find myself creating repositories in some non-root volume, mounted at eg. /mnt/borg. For convenience, I often create a symlink ~borg/repos --> /mnt/borg.
This, however, breaks this check: repositories paths are not normalized by resolving symlinks, and if I eg. have a borg prune running automatically on the ~borg/repos/... paths, but run once manually any command on /mnt/borg/..., the next automatic run of prune will break.
Would it be possible to resolve symlinks, eg. in the canonical_path function, in order to fix this behaviour?
Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.
borg -r /tmp/foo rcreate -e none # or whatever, this repository won't be really used
ln -s /tmp/foo /tmp/bar
borg -r /tmp/foo rlist # works fine
borg -r /tmp/bar rlist # complains with directory relocation
borg -r /tmp/foo rlist # complains again with directory relocation
Have you checked borgbackup docs, FAQ, and open GitHub issues?
Yes
Is this a BUG / ISSUE report or a QUESTION?
Issue
System information. For client/server mode post info for both machines.
Your borg version (borg -V).
Git repository
masterbranch,1.2.4and probably all recent-ish versionsOperating system (distribution) and version.
Any
Hardware / network configuration, and filesystems used.
/
How much data is handled by borg?
/
Full borg commandline that lead to the problem (leave away excludes and passwords)
Describe the problem you're observing.
Borg has a built-in protection against repository relocation, which can be disabled with the
BORG_RELOCATED_REPO_ACCESS_IS_OKenvironment variable. This check, however, serves security purposes; if possible, it is better not to disable it.On backup servers, I often find myself creating repositories in some non-root volume, mounted at eg.
/mnt/borg. For convenience, I often create a symlink~borg/repos --> /mnt/borg.This, however, breaks this check: repositories paths are not normalized by resolving symlinks, and if I eg. have a
borg prunerunning automatically on the~borg/repos/...paths, but run once manually any command on/mnt/borg/..., the next automatic run of prune will break.Would it be possible to resolve symlinks, eg. in the
canonical_pathfunction, in order to fix this behaviour?Can you reproduce the problem? If so, describe how. If not, describe troubleshooting steps you took before opening the issue.