PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
1. Client bundles
Every bundle task lands both architectures of one bundle, then verifies the binaries by running them inside the runtime base image. The verification command for an amd64 tree is:
docker run --rm --platform linux/amd64 -v "$PWD/assets/tools:/tools:ro" debian:bookworm-slim \
bash -c 'apt-get update -qq && apt-get install -y -qq libedit2 libncurses6 libtinfo6 libssl3 >/dev/null && \
/tools/x64/<engine>/<bundle>/bin/<command> --version'
The arm64 tree cannot be executed on an amd64 host without emulation; tasks 3.1 and 3.2 make the product itself verify it at startup on a real arm64 build.
- 1.1 Add
assets/tools/{x64,arm}/mysql/mysql-26/bin/{mysql,mysqldump}fromhttps://cdn.mysql.com/Downloads/MySQL-26.7/mysql-26.7.0-linux-glibc2.28-{x86_64,aarch64}.tar.xz, strip the binaries, and verify the x64 pair reports26.7.0under the command above - 1.2 Refresh
assets/tools/{x64,arm}/mysql/mysql-9/bin/frommysql-9.7.2-linux-glibc2.28-{x86_64,aarch64}.tar.xzat the same download host, and verify the x64 pair reports9.7.2 - 1.3 Refresh
assets/tools/{x64,arm}/mysql/mysql-8.4/bin/frommysql-8.4.11-...andmysql-8.0/bin/frommysql-8.0.46-..., and verify each x64 pair reports its new patch - 1.4 Confirm
mysql-5.7already carries 5.7.44, the final patch of that line, and leave it unchanged; record the check inassets/tools/README.mdrather than touching the binaries - 1.5 Add
assets/tools/{x64,arm}/mariadb/mariadb-13.0/bin/{mariadb,mariadb-dump}from the vendor's Ubuntu jammy packageshttps://mirror.mariadb.org/repo/13.0/ubuntu/pool/main/m/mariadb/mariadb-client{,-core}_13.0.2+maria~ubu2204_{amd64,arm64}.deb—mariadb-dumpships inmariadb-client,mariadbinmariadb-client-core— and verify the x64 pair reports13.0.2-MariaDB - 1.6 Replace
assets/tools/{x64,arm}/mariadb/mariadb-12.1/withmariadb-12.3/built fromhttps://mirror.mariadb.org/repo/12.3/debian/for bookworm on both architectures, and verify the x64 pair reports12.3.3-MariaDB - 1.7 Refresh
assets/tools/{x64,arm}/mariadb/mariadb-10.6/bin/to 10.6.28 fromhttps://mirror.mariadb.org/repo/10.6/ubuntu/for jammy on both architectures, so both architectures carry the same build; today they do not — the x64 copy comes from the architecture-independent tarball and reports 10.6.21, while the arm copy comes from distribution packaging and carries a 10.11 version string, which the refresh resolves. Verify the x64 pair reports10.6.28-MariaDB - 1.8 Generalise
tools/refresh-mariadb-x64-libedit.shinto one script covering tasks 1.5 to 1.7. It takes the exact package version, the vendor repository (Debian bookworm for 12.3, Ubuntu jammy for 13.0 and 10.6) and the target architecture, since those three differ per bundle. Pin the package version rather than installing the newest patch of a line, otherwise the result changes with upstream. For arm64 it downloads the.deband unpacks it withdpkg-deb -xinstead ofapt-get installunder--platform linux/arm64, because the development host has no emulation and unpacking needs none. Verify by re-running it for one already-committed bundle and confirmingsha256summatches the committed binaries - 1.9 Verify every new and refreshed binary is recorded executable in the index:
git ls-files -s assets/tools | grep -v '^100755' | grep -E 'mysql|mariadb'prints nothing - 1.10 Verify every bundle now holds the version its directory name claims, which
assets/tools/arm/mariadb/mariadb-10.6/does not today — it reports10.11.14-MariaDB. For each bundle, read the version out of the binary (--versionon x64,stringson the arm tree) and confirm it starts with the bundle's line:mariadb-10.6→10.6.x,mariadb-12.3→12.3.x,mariadb-13.0→13.0.x,mysql-26→26.x - 1.11 Measure what the change costs the CI runner before relying on it:
du -sh assets/tools/{x64,arm}for the tree, anddocker pullfollowed bydocker image lsformysql:26.7,mariadb:13.0,mariadb:5.5andmariadb:10.1. The pre-pull step in.github/workflows/ci-release.yml:250-256already frees ~11 GB to fit ~19 GB of images and says the fit is tight; if the new images no longer fit, extend that step's cleanup in the same change
2. Version identity and client selection
- 2.1 Add the MySQL 26 identity and its bundle to
backend/internal/util/tools/mysql.go, and make bundle resolution report whether the bundle for the running architecture is present instead of returning a path that may not exist; verify withgo test ./internal/util/tools/... -count=1 - 2.2 Extend MySQL version detection in
backend/internal/features/databases/databases/mysql/model.goso every 26.x server maps to the 26 identity, whatever its minor, and keep every unserved major refused with a message listing the supported versions. LeavemapMysql8xVersionas it is: major 8 is closed at 8.4, so its fallthrough has nothing left to mis-route. Verify withgo test ./internal/features/databases/... -count=1 - 2.3 Add the MariaDB 13 server identity and a 13.0 client tier in
tools/mariadb.go, extend detection inmariadb/model.goso every 13.x server maps to the 13.0 identity, and route that identity to the new tier. A 13.2 server is accepted by the 13.0 client because they share a release line; a 14.x server is refused because no 14 client ships. Verify withgo test ./internal/features/databases/... -count=1 - 2.4 Refuse a version whose client is absent for the running architecture at the connection test, naming the architecture, which is what MySQL 5.7 on arm64 needs; today that case resolves to a missing path and fails when a backup runs; verify with
go test ./internal/features/databases/... -count=1 - 2.5 Replace the version-order maps behind the restore downgrade guard in
tools/mysql.goandtools/mariadb.gowith a comparison that parses the numbers in the identity, so a newly added identity orders correctly without a table entry and an unparseable identity returns an error instead of ordering as zero; cover both new identities; verify withgo test ./internal/features/restores/... ./internal/util/tools/... -count=1 - 2.6 Extend the compression candidate selection in
backend/internal/features/backups/backups/usecases/logical/mysql/compression_probe.goso every identity above 5.7 negotiates from the modern algorithm set, and make the 5.7 path explicit rather than a fallthrough; verify withgo test ./internal/features/backups/... -count=1 - 2.7 Delete
GetMysqlVersionEnumandGetMariadbVersionEnum, which have no callers anywhere including tests, so the new identities do not have to be added to code nothing reads; verify withmake lintandgo build ./...
3. Startup and health verification
- 3.1 Change the client check in
backend/internal/util/tools/common.goto execute each client's version flag instead of only checking presence and the executable bit, keeping the existing fatal tier for PostgreSQL and the warning tier for the others; verify withgo test ./internal/util/tools/... -count=1and by starting the backend with a bundle directory temporarily renamed, which must produce a warning naming that bundle - 3.2 Compare the version each client prints with the release line its bundle is registered under, and report a mismatch as a failure of that bundle. The output formats differ per engine and the MariaDB one carries two numbers —
mariadb-dump ... from 12.1.2-MariaDB, client 10.19 ..., where the bundle's line is the one before-MariaDB— so parse per engine rather than taking the first number found. Verify withgo test ./internal/util/tools/... -count=1, including a case that pins a bundle holding a foreign version as a failure - 3.3 Keep the execution and version comparison to once per process and have
ClientToolsHealthErrorreport the cached verdict, re-checking only that the files are still present. The container probes the endpoint every 30 seconds with a 5 second timeout (Dockerfile:204), and running roughly 38 client binaries per probe is how a loaded host reports a false unhealthy. Verify withgo test ./internal/util/tools/... -count=1and by confirming that deleting a bundle directory under a running backend still degrades the health endpoint - 3.4 Add the new bundles to the lists the check walks in
tools/mysql.goandtools/mariadb.go, and confirm a clean start reports every bundle verified - 3.5 Extend the
libedit.so.2shim inbackend/Makefile:19-29fromtest-fedorato arun-fedoratarget, since running the binaries makes the check fail for the MariaDB clients on a host that shipslibedit.so.0; verify by starting the backend on such a host and seeing MariaDB reported as verified rather than disabled
4. Frontend
- 4.1 Delete the version label maps in
frontend/src/features/databases/ui/show/Show{MySql,MariaDb}SpecificDataComponent.tsxand render the recorded identity string directly, so an identity the release does not know about displays as itself rather than as an empty value; verify withpnpm lint,pnpm testandpnpm buildinfrontend/ - 4.2 Add the new identities to
frontend/src/entity/databases/model/mysql/MysqlVersion.tsandmariadb/MariadbVersion.ts, keeping the enumeration as the type of the version field since the set of identities is closed; verify withpnpm lintandpnpm buildinfrontend/ - 4.3 Confirm the two new identities survive the whole path: add a MySQL 26 database and a MariaDB 13 database against real servers and confirm each view shows its version rather than an empty field. The version field is an unconstrained string in the API schema, so
make swaggerhas nothing to regenerate here
5. Tests against real servers
- 5.1 Add
mysql:26.7to the matrix inbackend/internal/features/databases/databases/mysql/model_test.goandmariadb:13.0tomariadb/model_test.go, covering connection, privilege detection and read-only user creation; verify withgo test ./internal/features/databases/... -count=1 - 5.2 Add the same two images to the backup and restore matrices in
backend/internal/features/tests/logical/{mysql,mariadb}/backup_restore_test.go, including the encryption, exclude-tables and read-only-user cases the neighbouring versions run; verify withgo test ./internal/features/tests/logical/mysql/... ./internal/features/tests/logical/mariadb/... -count=1 - 5.3 Add
mariadb:5.5andmariadb:10.1to both MariaDB matrices, which today start at 10.6 and therefore never exercise the legacy client tier at all — the tier whose arm64 bundle holds a 10.11 binary. Skip the subtests those servers genuinely cannot run, the way the matrix already gatesrunsRoutineGrantTest, rather than dropping the versions. Verify withgo test ./internal/features/databases/... ./internal/features/tests/logical/mariadb/... -count=1 - 5.4 Add cases asserting the refusals on both engines: a MySQL major above 26 and a MariaDB major above 13 are refused with a message listing the supported versions, and a version whose client is absent for the running architecture is refused naming the architecture; verify with
go test ./internal/features/databases/... -count=1 - 5.5 Add mapping cases for the other half of the rule: a MariaDB 13.2 server records the 13.0 identity and a MySQL 26.10 server records the 26 identity, so a later release inside a served line stays accepted; verify with
go test ./internal/features/databases/... -count=1 - 5.6 Add restore guard cases asserting that a backup from MySQL 26.x is refused onto 9.x and 8.x, and a backup from MariaDB 13.x onto 12.x; verify with
go test ./internal/features/restores/... -count=1 - 5.7 Add a case pinning the behavior from issue #786 — a server whose version string carries a vendor suffix such as
26.7.0-cloudis accepted — which is the one place an issue number belongs in the tests; verify withgo test ./internal/features/databases/... -count=1
6. Documentation
- 6.1 Update
assets/tools/README.md: the bundle layout and the per-bundle version table for MySQL and MariaDB, the download source of every bundle, the shared libraries the binaries need from the runtime image, and the note thatlibedit.so.2reaches the image only as a dependency ofpostgresql-common - 6.2 Add
assets/tools/AGENTS.mdcarrying the checklist for adding a new engine version and for refreshing a patch level, using the draft in this change atassets-tools-agents-draft.mdas the starting content - 6.3 Update the supported-version lines in
README.mdand in all five copiesassets/readme/README.{es,fr,pt,ru,zh}.md, asassets/readme/AGENTS.mdrequires; each list sits at lines 115-116 of its file, and the Chinese copy uses its own list punctuation. Three edits, not one: add the new versions, mark MySQL 5.7 as x86-64 only now that arm64 refuses it, and correct the MariaDB line, which reads "10, 11 and 12" while the product also accepts 5.5 - 6.4 Update the MySQL landing page on the website, which states the supported versions in six languages:
website/app/(en)/mysql-backup/page.tsxand the five copies underwebsite/app/[lang]/mysql-backup/content/. Each copy repeats the list in five places — the feature bullets, the JSON-LD FAQ entry, the prose in the compatibility section, the per-version cards, and the visible FAQ answer — andwebsite/AGENTS.mdrequires the visible FAQ and its JSON-LD copy to agree, so find them withgrep -rn '5\.7\|MariaDB 1' website/app/*/mysql-backuprather than by line number. Verify withnpm run lintandnpm run buildinwebsite/, the commandswebsite/AGENTS.mdnames
7. Whole-suite verification and review
- 7.1 Run
make lintfor the backend,pnpm lintandpnpm formatinfrontend/, andnpm run lintinwebsite/, and fix every finding - 7.2 Run the whole backend suite once, at the end, with
make testormake test-fedoraon a Fedora host, since it recreates the shared containers and database slots other agents draw from. Four new containers join the run against a-timeout 15mbudget (backend/Makefile:16); if the suite now exceeds it, raise the budget in the same change rather than dropping matrix cases - 7.3 Resolve every
CHANGES REQUIREDfinding from the mandatory post-implementation review, and leave the working tree ready to commit