Using backup storage with restic, Synology, QNAP and Mac
The backup storage is S3-compatible, so it works with practically every modern backup tool. Your setup email contains:
- Endpoint: the address of the storage
- Bucket: the name of your storage area
- Access key and secret key: your credentials
- Region: in case your tool asks for one
Encrypt your backups. restic always encrypts. On Synology and QNAP, turn on client-side encryption. Then nobody but you can read the data. Keep the password safe: without it the backup cannot be restored.
restic (Windows, Mac, Linux)
restic is a free command-line backup tool.
-
Install restic, for example with Homebrew (
brew install restic), your Linux distribution’s package manager or the download from the restic website. -
Set your credentials (Mac and Linux):
export AWS_ACCESS_KEY_ID="<access key>" export AWS_SECRET_ACCESS_KEY="<secret key>" export RESTIC_REPOSITORY="s3:<endpoint>/<bucket>" export RESTIC_PASSWORD_FILE="$HOME/.config/restic/password"On Windows (PowerShell), write for example
$env:AWS_ACCESS_KEY_ID = "<access key>". -
Create the repository once:
restic init -
Back up your data:
restic backup ~/Documents ~/Pictures -
Clean up old snapshots regularly:
restic forget --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --prune -
Test a restore:
restic restore latest --target ~/restore-test
Automate the backup with Task Scheduler (Windows), launchd (Mac) or a systemd timer (Linux).
Synology (Hyper Backup)
- Install Hyper Backup from the Package Center.
- In Hyper Backup, create a new data backup task.
- Choose S3 Storage as the destination and Custom Server URL as the S3 server.
- Enter the endpoint (without
https://), access key, secret key and bucket. Choose signature version v4. - Select the folders and applications you want to back up.
- Turn on client-side encryption and keep the password and key file safe.
- Set a schedule and enable rotation so that old versions are deleted automatically.
QNAP (Hybrid Backup Sync 3)
- Open HBS 3 and create a new backup job.
- Add a cloud storage destination of type S3 Compatible and enter the endpoint, access key and secret key.
- Choose the bucket and the folders you want to back up.
- Turn on client-side encryption and set a schedule.
Mac and Time Machine
Time Machine cannot back up to S3 storage directly. Two proven options:
- Time Machine to a NAS on your network. The NAS then backs up to the backup storage with Hyper Backup or HBS 3.
- Straight from the Mac with an S3-capable tool such as Arq or restic.
Veeam
Add the backup storage to Veeam as object storage of type S3 Compatible and enter the endpoint, region, access key, secret key and bucket.
Tips
- Test regularly that you can restore your data. A backup only counts once a restore has worked.
- Follow the 3-2-1 rule: three copies of your data, on two different media, one of them off-site.