NixOS / infra

NixOS configurations for nixos.org and its servers
MIT License
209 stars 92 forks source link

non-critical-infra/backup: init and configure on caliban #345

Closed mweinelt closed 5 months ago

mweinelt commented 5 months ago

Adds a backup module, encapsulating borgbackup, and configures the storagebox we have for caliban.nixos.org.

The backup module will not be enabled until any path is added in to services.backup.includes, but I tested it, and it works.

mweinelt commented 5 months ago
+------------------------------------------------------------------+
| Welcome to your Storage Box.                                     |
|                                                                  |
| Please note that this is only a restricted shell environment and |
| therefore some shell features like pipes and redirects are not   |
| supported.                                                       |
+------------------------------------------------------------------+
u371748 /home > borg
Command not found. Use 'help' to get a list of available commands.

Looks like it can't be called interactively, but borg still manages to connect.

mweinelt commented 5 months ago

Works.


# BORG_RSH="ssh -p 23 -i /var/keys/storagebox-ssh-key" BORG_PASSCOMMAND="cat /var/keys/borg-secret" BORG_REPO="u371748@u371748.your-storagebox.de:caliban.nixos.org/repo" borg list
caliban-state-2024-01-29T15:38:59    Mon, 2024-01-29 15:39:06 [c3dfd6625b92079fea0afce49cbabc8f4e17acd17ffb907334587593eeda1688]
mweinelt commented 5 months ago

Merging, to unblock #287 and #336.