1.2 KiB
1.2 KiB
Backups
We use Restic to create backups and push them to two repositories.
Check ./modules/backups.nix
and ./hosts/nachtigall/backups.nix
for working examples.
Hetzner Storagebox
- Uses SFTP for transfer of backups
Adding a new host SSH public key to the storagebox:
First, SSH to nachtigall, then become root and add the new SSH public key
sudo -i
echo '<ssh-public-key>' | ssh -p23 u377325@u377325.your-storagebox.de install-ssh-key
Link to Hetzner storagebox docs.
Garage S3 buckets
- Uses S3 for transfer of backups
- One bucket per host, e.g.
nachtigall-backups
,metronom-backups
To start transfering backups from a new hosts, this is how to create a new bucket:
First, SSH to trinkgenossin, then use the garage
CLI to create a new key and bucket:
export GARAGE_RPC_SECRET=<secret-in-keepass>
garage bucket create <hostname>-backups
garage key create <hostname>-backups-key
garage bucket allow <hostname>-backups --read --write --key <hostname>-backups-key