Borg Backup
How to set up an encrypted backup on a Hetzner Storage Box
What’s in the box?
We are going to learn how to set up an encrypted backup using Borg Backup, which is stored on a Hetzner Storage Box. It’s easier than it might look!
What you going to need
- Borg Backup - for the heavy lifting
- Hetzner Storage Box - for storing your encrypted data
- Vorta - for automatically triggering your backups
BorgBackup
- Install BorgBackup
brew install borgbackup
- Create the repo
borg init --encryption=repokey-blake2 ssh://hetzner-storage-box/./my-backup-key
With repokey-blake2 the key is stored within the repository. You need to choose a strong passphrase. When keyfile-blake2 is used, the passphrase can be left blank, but you should make sure to export your key and store it in an offsite backup.
What's `/./`?
Defines the relative path from the home directory on the storage box.
- Export keys
# File
borg key export ssh://hetzner-storage-box/./<your-path> encrypted-key-backup
# Paper Key
borg key export --paper ssh://hetzner-storage-box/./<your-path> encrypted-key-backup.txt
# QR Code HTML
borg key export --qr-html ssh://hetzner-storage-box/./<your-path> encrypted-key-backup.html
Vorta
brew install --cask vorta
What's a `cask` again?
brew downloads a binary and installs it as macOS app under /Applications.