Backup storage
Restorly reads existing backups (and, in backup mode, writes new ones) wherever they are: on the validation host, on a NAS, on any SSH host, or in object storage. Each storage location is a locations[] entry (Configuration file); credentials are always secret:// references.
Object storage (S3-compatible)
Pick a provider; Restorly fills in the endpoint.
| Provider | provider | You enter | Notes |
|---|---|---|---|
| AWS S3 | aws | bucket, region, access key | IAM user or role with s3:ListBucket and s3:GetObject (plus s3:PutObject/s3:DeleteObject for backup mode). |
| Cloudflare R2 | r2 | bucket, account_id, access key; jurisdiction: eu for EU buckets | An R2 API token with Object Read (Object Read & Write for backup mode) on the bucket. |
| Google Cloud Storage | gcs | bucket, HMAC access key | Cloud Storage → Settings → Interoperability → create HMAC keys for a service account with Storage Object Viewer (Creator for backup mode). |
| Backblaze B2 | b2 | bucket, region (e.g. eu-central-003), application key | The application key must be allowed on the bucket. |
| Wasabi | wasabi | bucket, region, access key | |
| MinIO, Ceph, others | minio / custom | endpoint, bucket, access key | ca_cert for a private CA. |
locations:
- id: offsite
type: s3
provider: r2
account_id: 0123456789abcdef0123456789abcdef
jurisdiction: eu
bucket: backups
access_key: 9f1c...
credentials_ref: secret://r2-offsite # restorly secret set r2-offsite
SSH / SFTP hosts (QNAP, Synology, Linux)
Restorly has its own SSH key, generated on the validation host and stored encrypted. You authorise it on the storage host; no password is stored.
- Show the key:
restorly ssh-key show(or the storage step of the setup wizard). It prints anauthorized_keysline and an SFTP-only variant. - Add it on the host, to the account Restorly should use (ideally one that can only read the backup folder):
- Linux (OpenSSH): append the SFTP-only line to
~backup/(mode 600, directory 700).. ssh/ authorized_keys - QNAP (QTS/QuTS hero): in Control Panel → Network & File Services → Telnet/SSH, enable SSH and SFTP. Allow the account to use SSH (on recent QTS, Control Panel → Users → Edit application privileges). Put the key in
/share/. QNAP's SFTP paths start at the share, e.g.homes/ <user>/ . ssh/ authorized_keys path: /Backups/mysql. - Synology (DSM): in Control Panel → Terminal & SNMP, enable SSH; in Control Panel → File Services → FTP → SFTP, enable SFTP; in Control Panel → User → Advanced, enable user home. Put the key in
/var/(home directory not writable by group or others).services/ homes/ <user>/ . ssh/ authorized_keys - Hetzner Storage Box: enable SSH support, then create a sub-account with read-only access, a base directory (the backup folder's parent, e.g.
backups) and SSH enabled. A read-only sub-account cannot change its own keys, so upload the key line with the main account to<base directory>/.ssh/authorized_keys(folder 700, file 600). Then:- use port 23: key login works only there (port 22 is SFTP with a password);
- with the SFTP-only line, paths start at
/, so the folder is/home/(e.g.<folder> path: /home/wordpress).
- Linux (OpenSSH): append the SFTP-only line to
- Pin the host key:
restorly preflightprints the host's key fingerprints; copy the one you trust intohost_key.
locations:
- id: qnap
type: sftp
host: 10.0.0.20
user: restorly
host_key: SHA256:Lx1W... # from restorly preflight
path: /Backups
# no credentials_ref / private_key_ref: Restorly's own key is used
- id: storage-box # Hetzner Storage Box sub-account
type: sftp
host: u123456.your-storagebox.de
port: 23
user: u123456-sub1
host_key: SHA256:...
path: /home
If you prefer your own key, store it with restorly secret set qnap-key < id_ed25519 and set private_key_ref: secret://qnap-key.
SMB and local
- SMB/CIFS shares:
type: smbwithhost,share,user,credentials_ref(anddomainfor Active Directory). - Local or NFS:
type: localwith an absolutepath; mount NFS on the host first.
Copies and the 3-2-1 rule
If your backups are also copied somewhere else (rclone to object storage, NAS replication, a USB disk), list those places under the database's copies and mark storage away from the main site with offsite: true. With module check.copies on (Settings → Modules), every validation checks that the newest copy is there and fresh, and warns when there are not at least two backups on two different devices, one of them off site:
locations:
- id: nas-main
type: smb
host: 10.0.0.20
share: backups
- id: r2-offsite
type: s3
provider: r2
bucket: backups
offsite: true
targets:
- id: shop-prod
location: nas-main
path: /mysql/shop/
pattern: "shop-{YYYY}-{MM}-{DD}_{hh}{mm}.sql.gz"
copies:
- location: r2-offsite
path: shop/
max_age: 30h # the copy runs later than the backup
Copies are only listed, never downloaded or restored, and do not count as databases. The runner that validates the database must reach them too.