Backups made by other tools

Restorly validates the backups your tools already make: database dumps (mysqldump, mariadb-dump, pg_dump, mongodump, SQL Server .bak), physical backups (mariadb-backup, Percona XtraBackup, pg_basebackup) and, as described here, the repositories of dedicated backup tools. Each is restored in an isolated container on your validation host, checked, and signed into a report, exactly like a dump.

ToolDatabasesStatus
pgBackRestPostgreSQLsupported, encrypted repositories too (Business and Enterprise)
BarmanPostgreSQLsupported: Barman and Barman Cloud, which CloudNativePG uses for its backups (not yet: snapshot, incremental, compressed and encrypted backups)
WAL-GPostgreSQLsupported: full and delta backups, every compression (not yet: encrypted backups, WAL-G for other databases)
mydumperMySQL, MariaDBsupported: the default INSERT format, plain or compressed (not yet: --format LOAD_DATA and CSV)
Percona XtraBackupMySQL 8.0, 8.4supported: full backups, as an xbstream, a tar of the backup directory or the directory itself, optionally compressed or encrypted as a whole (format: physical; not yet: incremental backups, --compress and --encrypt, MySQL 9.7 until Percona releases XtraBackup for it)

Need one of these sooner, or another tool? Contact us at support@restorly.eu: we build them in the order customers ask for them.

Set up in the panel

Add the database (Databases → Add database, or the setup wizard), choose its engine and, as the format, pgBackRest repository, Barman or Barman Cloud or WAL-G. Give the backup location and, as the path, the repository inside it (below for each tool), and pgBackRest's stanza or Barman's server name. No name pattern is needed: the tool's own catalogue picks the newest backup. Check the repository reads that catalogue as a run does and shows the newest backup, or says what is wrong (a stanza that is not there, a repository Restorly's user cannot read); Next waits for it. mydumper's dumps are Dumps, with a pattern for the dump directories' names. The configuration file takes the same settings, shown for each tool below.

Encrypted backups

Restorly validates backups that a script or tool encrypted, in these formats, in the Business and Enterprise plans (module check.encrypted; on other plans such a database is skipped with the reason). Choose the format where you add the database (setup wizard, These backups are encrypted) or in the configuration file (targets[].encryption); keys and passwords are stored encrypted on the validation host, never in the file, and used only to decrypt into the throwaway restore. Test decryption in the wizard opens the newest backup with them before anything is saved.

FormatMade withWhat Restorly needs
ageage -r age1… backup.sql.zstthe private key (AGE-SECRET-KEY-1…)
GnuPGgpg --encrypt -r KEY (binary or --armor)the private key (gpg --export-secret-keys --armor KEY) and its passphrase if it has one
GnuPG, passphrase onlygpg --symmetricthe passphrase
OpenSSLopenssl enc -aes-256-cbc -pbkdf2 -pass … (also without -pbkdf2, AES-128/192, base64 -a)the password; other iterations or settings when the script uses them
ZIP with a passwordzip -P, 7-Zip or WinZip (ZipCrypto or AES)the password
7-Zip with a password7z a -p… (also -mhe=on)the password
SQL Server backup encryptionBACKUP DATABASE … WITH ENCRYPTION (…, SERVER CERTIFICATE = …), or a database with transparent data encryptionthe certificate and its private key (BACKUP CERTIFICATE … TO FILE … WITH PRIVATE KEY (FILE …, ENCRYPTION BY PASSWORD …)) and that password

ZIP and 7-Zip archives without a password need no settings. The backup inside may itself be compressed (.sql.gz in a ZIP is fine). When the settings say the backups are encrypted and one is not, the run warns: the backup tool may have stopped encrypting.

Archives holding several backups

Many servers are backed up into one archive a night with every database in it (db-01-2026-10-06.zip or .tar.gz holding shop.sql.gz, crm.sql.gz, …), or an archive keeps several days of one database. Add each database with the archive's name pattern, tick Each backup is an archive holding several files and give File inside the archive: the name pattern of that database's file, with the same tokens as the name pattern (targets[].file_in_archive in the configuration file).

  • ZIP, 7-Zip and tar archives work, also compressed (.tar.gz, .tar.zst) or encrypted (choose the encryption as above); the file inside may itself be compressed or encrypted.
  • The file is looked for by name in every directory of the archive.
  • With date tokens (shop-{YYYY}{MM}{DD}.sql.gz), the file with the newest date in its name is validated. Without, exactly one file must match: several matches, or none, fail with the archive's files listed.
  • Check the archive lists the newest archive's files and marks the one that will be validated.
  • An archive with only one file, and a tar whose first file is a dump, need no setting.
  • A tar archive has no table of contents, so it is read through once to find the file; a large one takes a while.

pgBackRest

Point Restorly at the repository (pgBackRest's repo1-path) and name the stanza. The stanza's catalogue says which backup is newest, so no file-name pattern is needed:

locations:
  - id: nas
    type: sftp            # or local, smb, s3: wherever the repository is
    host: backup.example.internal
    user: restorly
    path: /var/lib/pgbackrest

targets:
  - id: orders
    engine: postgres
    location: nas
    path: "."             # the repository's directory in the location
    format: pgbackrest
    pgbackrest: { stanza: main }
    max_age: 26h
    schedule: "30 6 * * *"

On every run Restorly:

  1. reads the stanza's backup.info and picks the newest backup (a full, differential or incremental one; a backup pgBackRest marked with page checksum errors is used only when there is no other);
  2. copies that backup, the full or differential backups it builds on, and the archived WAL segments from its start to its stop into the restore sandbox (nothing else in the repository is read, and nothing is written to it);
  3. runs pgbackrest restore there: pgBackRest checks every file against the backup's manifest;
  4. starts PostgreSQL on the result, recovers to the end of the backup with that WAL and promotes it;
  5. runs the checks: amcheck, row counts, schema drift, your own SQL checks.

The report names the backup (its label), the pgBackRest version that made it and the PostgreSQL version, and the disk check uses the exact restored size from the catalogue.

Read access: pgBackRest keeps the repository to its owner (usually postgres) and that owner's group (directories 0750, files 0640). Restorly's user, or the location's SFTP or SMB user, must be able to read it: add that user to the group (for example usermod -aG postgres restorly on the repository host). Restorly only reads; it never needs write access.

Encrypted repositories

A repository with repo-cipher-type=aes-256-cbc needs its passphrase, the repo1-cipher-pass of pgbackrest.conf on the database server. In the panel, tick The repository is encrypted under the stanza and enter it; in the configuration file, store it as a secret and name it:

    pgbackrest: { stanza: main, cipher_pass_ref: secret://orders-pgbackrest-pass }

Restorly reads the catalogue with it in memory and gives it to pgBackRest inside the restore sandbox only, through pgBackRest's configuration file there, which is emptied when the run ends. A wrong passphrase, or none, fails the run before anything is copied. Encrypted backups are part of the Business and Enterprise plans.

The pgBackRest image

PostgreSQL's official images do not include pgBackRest, so on the first run Restorly builds restorly-tools/pgbackrest:pg<version> on the validation host: the official postgres image of the backup's version plus the pgbackrest package from the PostgreSQL project's signed apt repository, which that image already trusts. Building takes about a minute and needs the host to reach the image registry and apt.postgresql.org, like an image pull does. The image is reused afterwards.

On a host without internet access (agent.docker.pull_policy: never), build the image on another host and load it:

docker build -t restorly-tools/pgbackrest:pg18 - <<'EOF'
FROM postgres:18
RUN apt-get update \
 && apt-get install -y --no-install-recommends pgbackrest \
 && rm -rf /var/lib/apt/lists/* \
 && pgbackrest version
EOF
docker save restorly-tools/pgbackrest:pg18 | gzip > pgbackrest-pg18.tar.gz
# on the validation host:
gunzip -c pgbackrest-pg18.tar.gz | docker load

Not yet (pgBackRest)

  • Backup mode, staging copies, the point-in-time restore test, the copies check and schedule: on_new_backup for pgBackRest databases.

Barman and Barman Cloud

Restorly validates the backups Barman keeps on a Barman server, and those Barman Cloud writes to object storage, which is how CloudNativePG backs up PostgreSQL on Kubernetes. Point Restorly at the destination path (Barman Cloud) or at barman_home (a Barman server), and name the server; its catalogue says which backup is newest, so no file-name pattern is needed:

locations:
  - id: bucket
    type: s3
    provider: aws          # or r2, gcs, b2, wasabi, minio: wherever the backups are
    bucket: pg-backups
    region: eu-central-1
    access_key: AKIA…
    credentials_ref: secret://bucket

targets:
  - id: orders
    engine: postgres
    location: bucket
    path: cnpg             # the destination path inside the bucket
    format: barman
    barman: { server: orders }
    max_age: 26h
    schedule: "30 6 * * *"

On every run Restorly:

  1. reads every backup's backup.info and picks the newest completed one (status DONE);
  2. reads it from the location and unpacks it in the restore sandbox: Barman Cloud's tar archives (gzip, bzip2, snappy, lz4 or zstd, also split into parts), or a Barman server's data directory, with each tablespace where the sandbox keeps it;
  3. copies in the WAL from the backup's first segment to its last, decompressed (a complete segment rather than a .partial one);
  4. starts PostgreSQL of the backup's version on it, which recovers to the end of the backup and is promoted;
  5. runs the checks: amcheck, row counts, schema drift, your own SQL checks.

Nothing in the bucket or on the Barman server changes: Restorly only reads.

CloudNativePG: the cluster's backup destination (destinationPath of its object store, with the Barman Cloud plugin or the older barmanObjectStore) is s3://<bucket>/<path>: put the bucket in the location and the path in path. The server name is the cluster's name unless serverName sets another. Credentials that can list the bucket and read its objects are enough.

A Barman server: use a location that reaches its backups (local, or sftp to the Barman server) with path set to barman_home (often /var/lib/barman). Restorly's user, or the location's SFTP user, must be able to read it: add it to the barman group.

Not yet (Barman)

  • Snapshot backups (the data in cloud volume snapshots), incremental backups (PostgreSQL 17's), Barman's compressed backups (backup_compression) and encrypted backups: a run says so.
  • Backup mode, staging copies, the point-in-time restore test, the copies check and schedule: on_new_backup for Barman databases.

WAL-G

Restorly validates the PostgreSQL backups WAL-G writes to object storage or a directory, which is how Zalando's PostgreSQL operator (Spilo) and many other setups back up. Point Restorly at WAL-G's prefix, the place that holds basebackups_005 and wal_005; WAL-G's catalogue says which backup is newest, so no file-name pattern is needed:

locations:
  - id: bucket
    type: s3
    provider: aws          # or r2, gcs, b2, wasabi, minio: wherever the backups are
    bucket: pg-backups
    region: eu-central-1
    access_key: AKIA…
    credentials_ref: secret://bucket

targets:
  - id: orders
    engine: postgres
    location: bucket
    path: spilo/orders/wal/18   # WALG_S3_PREFIX without s3://<bucket>/
    format: walg
    max_age: 26h
    schedule: "30 6 * * *"

On every run Restorly:

  1. picks the newest completed backup, the one whose sentinel (*_backup_stop_sentinel.json) WAL-G wrote last, as wal-g backup-fetch LATEST does;
  2. for a delta backup, follows it back to its full backup, and restores them in order, full first: whole files from each, and the changed pages a delta backup holds written over the files before it, as WAL-G does;
  3. unpacks the tar partitions in the restore sandbox, decompressed (lz4, lzma, zstd, brotli or gzip), with each tablespace where the sandbox keeps it;
  4. copies in the WAL from the backup's start to its end, found by name in wal_005;
  5. starts PostgreSQL of the backup's version on it, which recovers to the end of the backup and is promoted;
  6. runs the checks: amcheck, row counts, schema drift, your own SQL checks.

Nothing in the bucket changes: Restorly only reads. Credentials that can list the bucket and read its objects are enough.

The prefix: with WALG_S3_PREFIX=s3://pg-backups/spilo/orders/wal/18 the location's bucket is pg-backups and path is spilo/orders/wal/18. With WALG_FILE_PREFIX (a directory), use a local, sftp or smb location that reaches that directory.

Spilo (Zalando's operator): the prefix is in the database pods' environment, WALG_S3_PREFIX (often s3://<bucket>/spilo/<cluster>/<uid>/wal/<major version>).

Not yet (WAL-G)

  • Encrypted backups (WAL-G's libsodium, OpenPGP or KMS encryption): a run says the backup is encrypted. WAL-E's backups, and WAL-G's backups of other databases (MySQL, MongoDB, Redis and others).
  • Backup mode, staging copies, the point-in-time restore test, the copies check and schedule: on_new_backup for WAL-G databases.

mydumper

Restorly validates the dumps mydumper writes, for MySQL and MariaDB. A dump is a directory, export-20261021-020000 unless you name it: give Restorly the directory that holds the dumps and a pattern for their names, as for any other backup; Restorly recognises a mydumper dump by its metadata file.

targets:
  - id: shop
    engine: mariadb          # or mysql
    location: nas
    path: /backups/mydumper
    pattern: "export-{YYYY}{MM}{DD}-{hh}{mm}{ss}"
    timezone: Europe/Sofia   # mydumper names the directory in its host's time
    max_age: 26h
    schedule: "30 6 * * *"

mydumper names the directory in the local time of the host it runs on; timezone says which (UTC when not set).

On every run Restorly:

  1. picks the newest dump directory and reads its metadata: a dump without the "Finished dump at" line (mydumper was stopped, or is still writing) fails, as one still named metadata.partial does;
  2. loads it in a fresh server of the newest version Restorly validates (mydumper does not record the server's version; a newer server reads an older dump), through the server's own client, in myloader's order: databases, sequences, tables, data, then triggers, routines, events and views, decompressing gzip and zstd files on the way;
  3. counts each table's rows and compares them with the rows mydumper recorded in metadata: a missing or cut-short data file fails the run and names the table;
  4. runs the checks: CHECK TABLE, row counts, schema drift, your own SQL checks.

Nothing in the dump changes: Restorly only reads. The mysql and sys schemas, if the dump has them, are not loaded (the sandbox has its own). To pin the server version, set the database's image.

Not yet (mydumper)

  • Dumps in --format LOAD_DATA, CSV or CLICKHOUSE, dumps quoted with double quotes (--quote-character DOUBLE_QUOTE), and files made with --exec: a run says so.
  • Backup mode, staging copies and the point-in-time restore test for mydumper databases.

Percona XtraBackup

Restorly validates the full backups Percona XtraBackup takes of MySQL 8.0 and 8.4, in any of the forms it writes:

  • an xbstream: xtrabackup --backup --stream=xbstream --target-dir=/tmp, usually piped through zstd or gzip (shop-20261029.xb.zst);
  • a tar of the backup directory (tar -C /backups -cf shop-20261029.tar full);
  • the backup directory itself, left unpacked on the storage.

The whole file may be compressed (zstd, gzip) or encrypted (age, GnuPG, OpenSSL; see Encrypted backups). Set the database's format to Physical (format: physical):

targets:
  - id: wiki-prod
    engine: mysql
    location: nas-main
    path: /mysql/wiki/
    pattern: "wiki-{YYYY}{MM}{DD}.xb.zst"
    format: physical
    max_age: 26h

Restorly reads the stream's own checksums as it reads the backup, then, in the sandbox, extracts it, prepares it with XtraBackup (crash recovery with the redo log the backup carries) and starts MySQL of the same series on the result, without networking, the binary log, replication or the event scheduler. The same checks then run as on a dump: tables checked, rows counted, your custom SQL checks.

Give the user that takes the backups the privileges XtraBackup needs (BACKUP_ADMIN, PROCESS, RELOAD, LOCK TABLES, REPLICATION CLIENT, SELECT on performance_schema.log_status); Restorly itself never connects to the server for this.

The XtraBackup image

MySQL's official images do not include XtraBackup, so on the first run Restorly builds restorly-tools/xtrabackup:8.0 or :8.4 on the validation host: the official mysql image of the backup's series plus Percona's percona-xtrabackup-80 or percona-xtrabackup-84 package from Percona's repository, its signature checked against Percona's packaging key. Building takes a minute or two and needs the host to reach the image registry and repo.percona.com. The image is reused afterwards.

On a host without internet access, build it on another host and load it:

docker build -t restorly-tools/xtrabackup:8.4 - <<'EOF'
FROM mysql:8.4
RUN printf '[percona]\nname=Percona XtraBackup\nbaseurl=https://repo.percona.com/pxb-84-lts/yum/release/9/RPMS/$basearch\ngpgcheck=1\ngpgkey=https://repo.percona.com/yum/PERCONA-PACKAGING-KEY\nenabled=1\n' > /etc/yum.repos.d/percona.repo \
 && microdnf install -y --setopt=install_weak_deps=0 percona-xtrabackup-84 \
 && rm -f /etc/yum.repos.d/percona.repo && microdnf clean all \
 && xtrabackup --version
EOF
docker save restorly-tools/xtrabackup:8.4 | gzip > xtrabackup-8.4.tar.gz
# on the validation host:
gunzip -c xtrabackup-8.4.tar.gz | docker load

For MySQL 8.0 use mysql:8.0, pxb-80 and percona-xtrabackup-80.

Not yet (XtraBackup)

  • Incremental and partial backups (validate the full backups), and backups made with xtrabackup --compress or --encrypt (compress or encrypt the stream instead).
  • MySQL 9.7 and 26.x: Percona has no XtraBackup release for them yet; validate dumps of those servers.
  • Taking XtraBackup backups in backup mode, which takes dumps of MySQL.