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.

ProviderproviderYou enterNotes
AWS S3awsbucket, region, access keyIAM user or role with s3:ListBucket and s3:GetObject (plus s3:PutObject/s3:DeleteObject for backup mode).
Cloudflare R2r2bucket, account_id, access key; jurisdiction: eu for EU bucketsAn R2 API token with Object Read (Object Read & Write for backup mode) on the bucket.
Google Cloud Storagegcsbucket, HMAC access keyCloud Storage → Settings → Interoperability → create HMAC keys for a service account with Storage Object Viewer (Creator for backup mode).
Backblaze B2b2bucket, region (e.g. eu-central-003), application keyThe application key must be allowed on the bucket.
Wasabiwasabibucket, region, access key
MinIO, Ceph, othersminio / customendpoint, bucket, access keyca_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.

  1. Show the key: restorly ssh-key show (or the storage step of the setup wizard). It prints an authorized_keys line and an SFTP-only variant.
  2. 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/.ssh/authorized_keys (mode 600, directory 700).
    • 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/homes/<user>/.ssh/authorized_keys. QNAP's SFTP paths start at the share, e.g. 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/services/homes/<user>/.ssh/authorized_keys (home directory not writable by group or others).
    • 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/<folder> (e.g. path: /home/wordpress).
  3. Pin the host key: restorly preflight prints the host's key fingerprints; copy the one you trust into host_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: smb with host, share, user, credentials_ref (and domain for Active Directory).
  • Local or NFS: type: local with an absolute path; 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.