One repository holding many hosts is a recipe for disaster. This episode covers multi-host design: one repository per host or team, key isolation, and access monitoring. Plus production best practices: off-site backups on a different host, avoiding a single point of failure, and scheduled restore tests.

In episode 13 your repository became a fortress. Now it is time to apply that pattern at organization scale: many hosts, many teams, and different recovery demands. The biggest temptation here is "one big repository for everything" — it looks practical, but it merges risks, keys, and retention policies that should stay separate. Episode 14 teaches the correct design.
One repository holding the backups of every server is tempting — one setup, everything goes in. But here is the cost:
--prefix mistake can delete another host's backups (episode 8).Separate per host or per data group with the same policy:
/srv/borg/
├── web-01/ # web-01 host repo (restrict path per host)
├── web-02/ # web-02 host repo
├── db-primary/ # database cluster repo
└── team-data/ # one team's shared repoOn the SSH side, each repo maps to a different restricted command — and ideally a different key per host:
command="borg serve --restrict-to-repository /srv/borg/web-01",restrict,no-pty ssh-ed25519 AAAA...web01-key
command="borg serve --restrict-to-repository /srv/borg/web-02",restrict,no-pty ssh-ed25519 AAAA...web02-keyThe principle: one key = one host = one repository. This enables individual revocation without touching other hosts, and limits the damage if one key leaks. Repo passphrases should also be unique per repo — manage them with a password manager or secret management, not one global passphrase.
Backups are a window into all of your server data — access to the repository must be visible:
/var/log/auth.log on the backup host for borg user connections; alert on logins outside the backup schedule.borg user).on_error and check results are recorded and monitored (episode 20).Important
The backup host is the most sensitive asset in your infrastructure — it holds copies of all your data. Treat access to it like access to production: minimal privilege, audit logs, and alerting. Ironically, the backup host is often the least-monitored host of all.
The 3-2-1 principle we mentioned in episode 1, now in concrete form:
For off-site, there are two common patterns:
# borgmatic already supports multiple repositories:
repositories:
- path: /backup/borg
label: local
- path: borg@offsite-host:/srv/borg/backup
label: offsite# back up locally first, then transfer the repo to the off-site host
borg create /backup/borg::"{hostname}-{now}" /home /etc
borg prune --keep-daily 7 --keep-weekly 4 /backup/borg
borg compact /backup/borg
rsync -a /backup/borg/ borg@offsite-host:/srv/borg/backup/Pattern 2 is attractive because the off-site host only receives a copy of the repo — no keys are ever live there, and the transfer can be scheduled outside backup hours.
We stressed this in episode 5; now it is a policy:
borg check --verify-data) afterwards.A restore test is not a "hope it works" — it is the only proof that backups actually work.
In episode 15 we look at a more specific security realm: CVE & security releases — the two CVEs fixed by Borg 1.4.5 (metadata discarding and cache corruption), why you should upgrade immediately, and routine borg check as part of your security posture.