--- created: 2026-05-20 09:30 modified: 2026-05-20 09:30 type: note tags: - dev-ops - network - backup - system-config - localhost aliases: - 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 **Sources**: `/Docker/Containers/`, `/docker-config`, `/docker-volumes`, `/host_fs/root/trilium-data` **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) **Schedule**: - Kopia: Weekly Sun 22:00 (retention: 10 latest, 4 weekly, 12 monthly, 3 annual) - Backrest: Weekly Sun 23:00 (prune/check daily) **VM-level**: Proxmox Backup Server (.48) ## .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 ```bash export BORG_PASSPHRASE=$(cat /home/sam/.borg-passphrase) borg extract sam@192.168.20.13:/mnt/ubuntu_storage_3TB/backup/borg/.27:: ``` ### .13 restore ```bash export BORG_PASSPHRASE=$(cat /home/sam/.borg-passphrase) borg extract /mnt/ubuntu_storage_3TB/backup/borg/.13:: ``` ## Not Covered - `.27`: Git-tracked NixOS config (already covered by flakes) - `.13`: Git-tracked NixOS config, `ollama`/`open-webui` Docker volumes, old Windows drives - `.35`: Ubuntu VM filesystem (covered by Proxmox PBS), Obsidian vault (in Docker, covered by Kopia)