Borg Backup Patterns
Borg backup patterns I’ve actually used. Every entry has a date and context.
2026-04-01: Borg via NFS Mount (Not SSH)
Problem: Need a verified backup of the Razer workstation before deploying the P16g. Borg over SSH to the Synology NAS is slower than necessary.
Context: Pre-deployment backup of modestus-razer.inside.domusdigitalis.dev. Synology NAS exports NFS shares for Borg repositories.
The Fix:
# Mount NAS via NFS
sudo mkdir -p /mnt/synology
sudo mount -t nfs nas-01.inside.domusdigitalis.dev.inside.domusdigitalis.dev:/volume1/borg_backups /mnt/synology
# Load Borg passphrase from dsource
dsource d000 dev/storage
# Verify repo access
sudo -E BORG_PASSPHRASE="$BORG_PASSPHRASE" borg info /mnt/synology/borg-repo
# List recent archives
sudo -E BORG_PASSPHRASE="$BORG_PASSPHRASE" borg list /mnt/synology/borg-repo --last 3
# Run fresh backup
sudo -E BORG_PASSPHRASE="$BORG_PASSPHRASE" ~/.local/bin/borg-backup-synology.sh
Rule: Borg over NFS mount is significantly faster than Borg over SSH. Mount the NAS first, then target the local mount path. sudo -E preserves environment variables (including BORG_PASSPHRASE) across the sudo boundary. Always verify repo access and list recent archives before running a new backup.
Worklog: WRKLOG-2026-04-01
2026-04-02: Borg Init for New Machine
Problem: Need a separate Borg repository for the P16g — don’t mix backups from different machines in one repo.
Context: P16g deployment, Synology NAS already has borg-repo for the Razer. Creating borg-repo-p16g for the new machine.
The Fix:
# Mount NAS
sudo mount -t nfs nas-01.inside.domusdigitalis.dev.inside.domusdigitalis.dev:/volume1/borg_backups /mnt/synology
# Load passphrase
dsource d000 dev/storage
# Init new repo for P16g (repokey = passphrase-encrypted key stored in repo)
sudo -E BORG_PASSPHRASE="$BORG_PASSPHRASE" borg init --encryption=repokey /mnt/synology/borg-repo-p16g
# First backup
sudo -E BORG_PASSPHRASE="$BORG_PASSPHRASE" ~/.local/bin/borg-backup-synology.sh
# Verify
sudo -E BORG_PASSPHRASE="$BORG_PASSPHRASE" borg list /mnt/synology/borg-repo-p16g --last 3
Rule: One Borg repo per machine. --encryption=repokey stores the encryption key inside the repo (encrypted by your passphrase). Per-machine repos allow independent prune policies and prevent backup collision.
Worklog: WRKLOG-2026-04-02