Files
obsidian-vault/300 areas/360 Dev-Ops Network Computers/Backup System — Borg, Kopia & Restic.md

4.4 KiB

created, modified, type, tags, aliases
created modified type tags aliases
2026-05-20 09:30 2026-05-28 note
dev-ops
network
backup
system-config
localhost
borg-backups

Backup System — Borg, Kopia & Restic

Overview

Three-machine backup with dual-copy (local + network) covering all critical data.

Machine Tool Target Schedule
.27 — sam-4screen-desktop Borg (SSH) .13:/mnt/ubuntu_storage_3TB/backup/borg/.27 Daily (after boot)
.13 — nixos-desktop Borg (local) /mnt/ubuntu_storage_3TB/backup/borg/.13 + rsync→.35/.23 Daily 04:00 / 05:00
.35 — sam-ubuntu1 Kopia + Backrest .23 NFS (usb_3tb) Weekly Sun 22:00

.27 — sam-4screen-desktop

Source: /home/sam/ (excl: .cache, .npm, node_modules, .venv, target, .cargo, etc.) Target: sam@192.168.20.13:/mnt/ubuntu_storage_3TB/backup/borg/.27 via SSH (key: ~/.ssh/id_ed25519) Schedule: systemd timer — OnCalendar=daily (fires midnight, catches up after boot via Persistent) Prune: 7 daily, 4 weekly, 3 monthly Passphrase: /home/sam/.borg-passphrase Config: /etc/nixos/hosts/sam-4screen-desktop/backup.nix Status: systemctl status borgbackup-job-home-to-13.service Snapshots: borg list sam@192.168.20.13:/mnt/ubuntu_storage_3TB/backup/borg/.27

.13 — nixos-desktop

Source: Docker configs (/home/sam/Docker/), PocketBase (/home/sam/pocketbase-data/), dotfiles, .ssh/ Primary: /mnt/ubuntu_storage_3TB/backup/borg/.13 (local ext4, 2.7T, 2.6T free) Secondary: rsync → sam@192.168.20.35:/mnt/nfs_usb_3tb/borg-repos/.13.23 USB Schedule: Borg daily 04:00 | rsync daily 05:00 Prune: 7 daily, 4 weekly, 3 monthly Passphrase: /home/sam/.borg-passphrase (same as .27 recommended) Config: /etc/nixos/backup.nix Snapshots: borg list /mnt/ubuntu_storage_3TB/backup/borg/.13

⚠️ Borg runs as root — postHook chowns to sam:users. Known hosts issue: /home/sam/.ssh/known_hosts was a broken directory (fixed).

.35 — sam-ubuntu1

Tools: Kopia + Backrest (Restic) — Docker containers Target: //192.168.20.23/usb_3tb/mnt/nfs_usb_3tb/

  • Kopia repo: /mnt/nfs_usb_3tb/kopia/backups/ (46G)
  • Restic repo: /mnt/nfs_usb_3tb/backups/restic/ (11G)

Backup Sources

Source Tool Status
/Docker/Containers/ Kopia Weekly Sun 22:00
/docker-config, /docker-volumes Backrest (Restic) Weekly Sun 23:00
/host_fs/root/trilium-data Backrest (Restic) Weekly Sun 23:00
/host_fs/mnt/hdnew Backrest (Restic) Added 2026-05-28
/host_fs/var/lib/docker/volumes Kopia Weekly Sun 22:00

Retention

  • Kopia: 10 latest, 4 weekly, 12 monthly, 3 annual
  • Backrest: 10 latest (prune/check daily)

Data Drive (My Passport)

.dev/vda1 — 1.8T NTFS — physical WD My Passport passed through to VM Mount point: /mnt/hd (was incorrectly at /mnt/my_passport — fixed 2026-05-28) Contains: Immich photos (40K), and all Docker service data (audiobookshelf, lidarr, radarr, sonarr, qbittorrent, etc.)

VM-level

Proxmox Backup Server (.48) — full VM backup

.23 — file-server

  • 2.7T USB drive shared via CIFS/SMB to .35
  • Backup repos consume ~57G, 2.5T free
  • Also stores: sam/ (personal docs/music/photos)

Restore Commands

.27 restore

export BORG_PASSPHRASE=$(cat /home/sam/.borg-passphrase)
borg extract sam@192.168.20.13:/mnt/ubuntu_storage_3TB/backup/borg/.27::<archive>

.13 restore

export BORG_PASSPHRASE=$(cat /home/sam/.borg-passphrase)
borg extract /mnt/ubuntu_storage_3TB/backup/borg/.13::<archive>

Not Covered

  • .27: Git-tracked NixOS config (already covered by flakes)
  • .13: Git-tracked NixOS config, ollama/open-webui Docker volumes, old Windows drives, MaxtorBackup sde1 (1.4T, unmounted)
  • .35: .23 file-server has no backup — single point of failure for restic/kopia repos
  • .23: Itself has no backup at all

Recent Changes

  • 2026-05-28: Discovered My Passport (/dev/vda1, 1.8T) had all real data but was mounted at /mnt/my_passport instead of /mnt/hd. Remounted to /mnt/hd. Immich photos (40K) and all Docker service data recovered.
  • 2026-05-28: Added /host_fs/mnt/hd to Backrest (Restic) backup plan. Previously NOT covered — the 40K Immich photos escaped loss by luck.