Skip to content

Restore and point-in-time replay

How long it takes to get a database back: fetching the backup from the bucket, decrypting and decompressing it, writing it into an empty server, and, for a point-in-time restore, replaying the change stream up to the chosen moment. The data is the one from Backup throughput: a 644 MiB Postgres database and a 407 MiB MySQL database.

Postgres

Restore Fetched from the bucket Data transfer Database start and recovery Total
Physical backup into an empty data directory 160 MiB 4.4 s 2.9 s 7.6 s
Point in time: the same backup plus 29 WAL segments (464 MiB of WAL) 246 MiB 5.4 s 4.7 s 10.4 s
Logical backup into an empty server (pg_restore, index rebuilt) 97 MiB 9.4 s - 9.4 s
  • Data transfer is the restorer reading the objects from MinIO with parallel range reads, verifying their SHA-256, decrypting and decompressing them, and streaming the files to a receiver that writes the data directory (the same path a sandbox pod uses). For the logical restore it is the whole pg_restore run.
  • Database start and recovery runs Postgres on the restored directory with the sandbox wrapper, until it accepts connections. For the point-in-time restore it includes replaying the WAL: 464 MiB of WAL written by a 500,000-row update added 1.8 s to recovery compared with the plain physical restore.
  • Every restore was checked: the restored table has all 2,000,000 rows and, for the point-in-time restore, the sum(k) of the source at the target time.

MySQL

Restore Fetched from the bucket Duration Throughput (dump size)
Logical backup into an empty MySQL 8.4 66 MiB 24.6 s 11.9 MiB/s

The restore replays a 292 MiB mysqldump through the mysql client and rebuilds the secondary index. It is about three times slower than the backup: MySQL inserting rows is the limit, not Tenax.

What this means for recovery time

  • On this machine a physical Postgres restore moves about 85 MiB/s of database (644 MiB in 7.6 s); a sandbox restore of a large database is bound by the bucket's download speed and the volume's write speed, not by decryption.
  • Point-in-time restores cost the base restore plus the WAL replay. Replay is fast (about 250 MiB/s of WAL here), so the time since the last full backup matters more for the amount of WAL to download than for replay.
  • Logical restores rebuild indexes and are slower per byte than physical ones. Verification restores of logical backups take correspondingly longer.

The sandboxes in a cluster add pod scheduling and image pulls to these numbers; the harness measurement in Earlier measurements (9 s for a physical restore into a sandbox, k3d) includes them.

Machine and versions

One VM: Intel Xeon @ 2.80 GHz, 4 vCPUs (one thread per core), 15 GiB RAM, Linux 6.18. Go 1.26.10, Docker 29.8.2, Postgres 16.15 and MySQL 8.4.11 (official images), MinIO built from images/minio. Databases, sandboxes and MinIO ran in containers on the same VM with their data on tmpfs; the Tenax code (restorer, receiver) ran in the test process on the same 4 vCPUs. Measured on 2026-10-21.

Reproduce

hack/perf/run.sh local          # or: make perf-local (all suites)

The suite is TestPerfPostgres and TestPerfMySQL in test/component/perf_test.go; the results land in artifacts/perf/postgres.md and artifacts/perf/mysql.md. TENAX_PERF_ROWS and TENAX_PERF_MYSQL_ROWS change the dataset size.