Kitaab

My Borg + Nix Setup

tools cli nix mossnet

published 2025-03-16 00:12

updated 2025-03-16 22:35

The old instructions I had weren't cutting it.

I have a nixos module for configuring borg to my server, that allows each server to define it's own repo box -> mossnet

You can find other repos for each server by digging around their mossnet.backup config definition in helm The password for saving backups is stored under borg- in pass, and the ssh key should have access to rsync, so you don't need the rsync password

List archives

Each repo has an archive for each day, so you can restore a specific nightly backup borg list 20779@hk-s020.rsync.net:mossnet --rsh 'ssh -i /root/borg/borg-key'

Extract files

Files will be restored to the directory based on your relative working directory. Most backups are saved from / the very root directory. Only sudo has access to the root key. borg extract 20779@hk-s020.rsync.netbox-mossnet-2025-02-11T00:00:03 --rsh 'ssh -i /root/borg/borg-key' <path/to/restore>

The --dry-run and --list command can help look around for the specific file you want to load, if it is a specific file.