Configuration files are not backed up when behind a symbolic link #1270
Labels
No labels
blocked
breaking
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
borgmatic-collective/borgmatic#1270
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What I'm trying to do and why
Hi,
I am using NixOS to manage a small home server, using Borgmatic to perform backups. Because of the design of NixOS the configuration files for Borgmatic are placed under
/etc/static/borgmatic.dand pointed to by symbolic links placed under/etc/borgmatic.d.This causes Borgmatic to only include the symbolic links in the created archives, probably breaking the
config bootstrapaction.Steps to reproduce
Actual behavior
Backup only includes the symbolic links.
Expected behavior
Backup should include the configuration files.
Other notes / implementation ideas
Maybe this could be classified as "working as intended", but since the documentation mentions included configuration files being handled by Borgmatic I expected the same for symbolic links.
If my expectations are wrong, maybe a warning could be produced or included in the documentation.
The configuration file used (
/etc/borgmatic.d/mail.yaml):borgmatic version
2.0.11
borgmatic installation method
NixOS
Borg version
1.4.3
Python version
3.13.11
Database version (if applicable)
No response
Operating system and version
ANSI_COLOR="0;38;2;126;186;228"
BUG_REPORT_URL="https://github.com/NixOS/nixpkgs/issues"
BUILD_ID="25.11.20260216.fa56d7d"
CPE_NAME="cpe:/o:nixos:nixos:25.11"
DEFAULT_HOSTNAME=nixos
DOCUMENTATION_URL="https://nixos.org/learn.html"
HOME_URL="https://nixos.org/"
ID=nixos
ID_LIKE=""
IMAGE_ID=""
IMAGE_VERSION=""
LOGO="nix-snowflake"
NAME=NixOS
PRETTY_NAME="NixOS 25.11 (Xantusia)"
SUPPORT_END="2026-06-30"
SUPPORT_URL="https://nixos.org/community.html"
VARIANT=""
VARIANT_ID=""
VENDOR_NAME=NixOS
VENDOR_URL="https://nixos.org/"
VERSION="25.11 (Xantusia)"
VERSION_CODENAME=xantusia
VERSION_ID="25.11
Thanks for filing this. I'm fine "fixing" it, even if the current feature is blindly working as intended. I think the question will be whether to store the link + the destination ... or just the destination.
This is implemented in main and will be part of the next release! I went with storing everything—symlinks, destination config files, and any intervening symlinks along the way. Thanks again for bringing this to my attention.
Thanks for the quick fix, and taking your time to work on Borgmatic :)
Released in borgmatic 2.1.3!