# Backups

We use [Restic](https://restic.readthedocs.io/en/stable/) 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 pioneer](./administrative-access.md#ssh-access), then become root and add the new SSH public key

```
sudo -i
echo '<ssh-public-key>' | ssh -p23 <user>@<user>.your-storagebox.de install-ssh-key
```

[Link to Hetzner storagebox docs](https://docs.hetzner.com/robot/storage-box/backup-space-ssh-keys).