This page covers common configuration steps for BorgBackup deployments.
Use the same configuration file referenced in the setup guide for your installation.
BorgBackup is usually configured through environment variables, repository layout, and scheduled command execution.
Typical paths:
/etc/borg/env
/var/backups/borg/
export BORG_REPO=/var/backups/borg/repo
export BORG_PASSPHRASE='change-me-strong-passphrase'
borg init --encryption=repokey-blake2 "$BORG_REPO"
borg create --stats --compression zstd,6 \
"$BORG_REPO::'{hostname}-{now:%Y-%m-%d_%H:%M:%S}'" \
/etc /home /var/lib
borg prune -v --list "$BORG_REPO" \
--keep-daily=7 --keep-weekly=4 --keep-monthly=6
BORG_PASSPHRASE in a protected environment file, not plaintext in scripts./tmp, caches, containers) from backup sets where appropriate.borg check.Reload services or restart the storage daemon after updates.
If using timers/cron, reload scheduler definitions after script changes.
Create a test volume or object to confirm configuration is valid.
borg list "$BORG_REPO"
borg check "$BORG_REPO"
borg extract --dry-run "$BORG_REPO::<archive-name>"