PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FEATURE (mongodb): Propose MongoDB 9 support with Database Tools 100.19.1 from a recorded vendor source, so 9.x servers get backups and the lapsed CVE exception goes away
Rostislav Dugin1c2fe160d4b3
diff --git a/openspec/changes/support-mongodb-9/.openspec.yaml b/openspec/changes/support-mongodb-9/.openspec.yamlnew file mode 100644index 00000000..53f62d70--- /dev/null+++ b/openspec/changes/support-mongodb-9/.openspec.yaml@@ -0,0 +1,2 @@+schema: spec-driven+created: 2026-10-10diff --git a/openspec/changes/support-mongodb-9/design.md b/openspec/changes/support-mongodb-9/design.mdnew file mode 100644index 00000000..57497202--- /dev/null+++ b/openspec/changes/support-mongodb-9/design.md@@ -0,0 +1,100 @@+## Context++See proposal.md for why. The current MongoDB support has one client and three version tables:++- One bundle serves every server: `assets/tools/{x64,arm}/mongodb/bin/` holds `mongodump` and `mongorestore` 100.16.1, and `backend/internal/util/tools/mongodb.go:44` checks only that they start, because the bundle is not named after a server line.+- Detection reads `buildInfo`, takes `major.minor` (`backend/internal/features/databases/databases/mongodb/model.go:614`) and maps it through a `switch` on the major (`model.go:640`), refusing 4.0 and 4.1 and anything above 8.+- The restore downgrade guard looks both identities up in a map (`backend/internal/util/tools/mongodb.go:61-71`), called from `backend/internal/features/restores/service.go:306`. A missing entry orders as 0.+- `GetMongodbVersionEnum` (`mongodb.go:76`) is a third table, a `switch` that panics on an unknown major, and nothing outside its own file calls it.+- The MySQL guard already orders identities by their numbers through `compareReleaseLines` (`backend/internal/util/tools/mysql.go:119`, `backend/internal/util/tools/releaseline.go:38`) and returns an error for an identity it cannot read.+- The frontend declares `'4.2'`, `'4.4'`, `'5.0'` … `'8.0'` (`frontend/src/entity/databases/model/mongodb/MongodbVersion.ts:1-8`), while the backend stores and sends `"4"` … `"8"` (`mongodb.go:16-22`). The enum is only a field type; no screen renders the MongoDB version.+- The test matrices that boot real servers cover 5.0, 6.0, 7.0 and 8.2 (`model_test.go:31-35`, `backend/internal/features/tests/logical/mongodb/backup_restore_test.go:60-65`). MongoDB 4.x has no real-server test.++The approach is constrained by `assets/tools/AGENTS.md` (bundle provenance, both architectures from one source, verification in the runtime image, no version tables, identity constants on both sides, whole-matrix runs after a refresh), ADR-0005 (binaries are committed, not installed in the `Dockerfile`), `backend/AGENTS.md` (test naming, almost no comments) and `frontend/AGENTS.md` (one type per file in `model/`).++## Goals / Non-Goals++**Goals:**++- A MongoDB 9.x server is accepted, backed up and restored with a client whose vendor compatibility statement lists the 9 line.+- Adding the next MongoDB major takes one bound and one constant per side, with no table that silently misorders a forgotten entry.+- The shipped MongoDB binaries can be traced to a vendor archive and checksum.++**Non-Goals:**++- Holding the MongoDB bundle to a tools version at startup.+- Adding MongoDB 4.x servers to the real-server matrices.++## Decisions++### D1. Ship Database Tools 100.19.1++The vendor's compatibility statement for 100.19.1 lists server 9.0, 8.0 to 8.3, 7.0, 6.0, 5.0, 4.4 and 4.2, which covers every identity we accept. It is the newest release, and the `client-tool-bundles` spec asks for the newest patch of a maintained line. It also carries `golang.org/x/crypto` v0.57.0, past the fix the CVE-2026-56854 exception was waiting for.++Rejected: 100.18.0, the first release with 9.0 support. It is already superseded and gains nothing over 100.19.1. Staying on 100.16.1 and accepting 9 anyway is rejected because 100.16.1 predates 9.0 support, and the product never dumps a server whose major line the shipped client's compatibility statement does not list.++### D2. Take both architectures from the `ubuntu2204` build++The vendor builds the tools per distribution. `ubuntu2204` exists for both `x86_64` and `arm64`, needs glibc 2.34 at most (the runtime image has 2.36), and links only `libc` and `libgssapi_krb5.so.2`, which the image already carries (`assets/tools/README.md`, shared-library table). Using one build family for both architectures follows the rule at `assets/tools/AGENTS.md:107`.++Rejected: `debian12`, the build closest to the `debian:bookworm-slim` runtime. It has no `arm64` archive, so arm would come from a different family, which is exactly the mixing the rule forbids. Also rejected: `ubuntu2404`, which works equally well today but gains nothing, while an older build base keeps the library floor lower.++The archive checksums are taken from the vendor's `release.json` and the download is checked against them before the binaries are copied. The URL and checksum of each archive go into `assets/tools/README.md`, next to the MySQL and MariaDB source tables.++### D3. Map the detected version by its numbers, with one upper bound++`mapMongodbVersion` takes the whole version string `buildInfo` reports, instead of the major and minor that `detectMongodbVersion` cuts out with a regular expression today (`model.go:625-633`). It parses the leading `major.minor` as integers, refuses anything below 4.2 and anything above a single constant naming the newest supported major, 9, and otherwise returns the major as the identity. Moving the parsing into the function puts all three refusals behind one entry point that a table test covers without a server:++- an unreadable value: `could not parse MongoDB version: <value>`;+- below 4.2, including 3.6: `unsupported MongoDB version: 4.0 (minimum supported: 4.2)`;+- above the bound: `unsupported MongoDB version: 10.0 (supported: 4.2 through 9.x)`.++The upper bound is a major line, not the exact releases the vendor lists. The vendor names 9.0 for 100.19.1, and a 9.2 server is still accepted, because the `database-version-support` spec treats a newer release inside a covered line as a gap closed by refreshing the client.++Rejected: keeping the `(major, minor string)` signature. The unreadable-value refusal would then stay in `detectMongodbVersion`, reachable only through a live server. Also rejected: adding `case "9"` to the existing `switch`. That is the version table `assets/tools/AGENTS.md:74` calls a bug, and it keeps the error message as a hand-written list that drifts from the cases. Also rejected: no upper bound at all, accepting any future major. The bundled tools would then dump a server the vendor has not declared support for, which the `database-version-support` spec forbids.++### D4. Order MongoDB identities through `compareReleaseLines`++`IsMongodbBackupVersionHigherThanRestoreVersion` becomes `(bool, error)` and delegates to `compareReleaseLines`, like the MySQL guard. `restores/service.go:306` returns the error when an identity cannot be read.++Rejected: adding `9` to the map. A forgotten entry orders as 0, so a guard extended by hand fails open, and this change would leave that trap for the next major. Also rejected: a local `strconv.Atoi` comparison in `mongodb.go`. It would duplicate `releaseline.go` for no gain.++### D5. Delete `GetMongodbVersionEnum`++Nothing calls it, and keeping it means extending one more table that panics on an unknown major.++Rejected: extending it with `9` and keeping it for a possible caller. No caller exists, and the root `AGENTS.md` lists dead code among the things a change cleans up in the code it touches.++### D6. Frontend values match the backend identities++`MongodbVersion` becomes `MongodbVersion4 = '4'` through `MongodbVersion9 = '9'`, and the one test that uses a member is updated. This follows the `assets/tools/AGENTS.md` rule that the backend and frontend constants name the same value.++Rejected: adding only `MongodbVersion90 = '9.0'`. It would extend a type that matches nothing the backend sends. Also rejected: replacing the enum with `string`. That drops the build-time check the rule relies on.++### D7. Pin the test image to `mongo:9.0.2-noble`++The new entry follows the newest one, `mongo:8.2.3-noble`, which pins a patch, so a run does not change when Docker Hub moves a tag. The older entries (`mongo:5.0`, `mongo:6.0`, `mongo:7.0`) float and stay as they are. `just pull-testcontainers` collects images from the source, so the new one is pulled without further changes.++Rejected: `mongo:9.0`, which floats with each patch release.++### D8. Delete the expired Trivy exception++The exception at `.trivyignore.yaml:12-23` covered the 100.16.1 binaries and expired on 2026-10-05. The new binaries carry the fixed `x/crypto`, so the exception goes away with the binaries it described.++Rejected: renewing it with a new date. The finding it silenced no longer applies.++### D9. Leave accepted ADRs as they are++ADR-0005 and ADR-0013 list MongoDB versions as they stood when those decisions were made. Updating them would rewrite the record rather than document current behavior; the current list lives in the READMEs and in `assets/tools/README.md`.++## Risks / Trade-offs++- [The bundle refresh changes the client for every MongoDB server, not only 9.x] → Run the whole MongoDB backup/restore and model matrices on the new binaries, as `assets/tools/AGENTS.md:121` requires.+- [MongoDB 4.2 and 4.4 have no real-server test, so a regression there would only show in production] → The vendor's statement for 100.19.1 lists both. Adding 4.x to the matrices is left out of this change, and the gap is stated here so a reviewer can decide otherwise.+- [A binary that runs on a Fedora host can still fail in the runtime image] → Run `--version` for both architectures inside `debian:bookworm-slim` before committing, following the `assets/tools/AGENTS.md` refresh command.+- [A binary committed without the executable bit fails only at runtime] → Check the working tree, not the index, which keeps the old mode until the files are staged: `stat -c '%a'` shows `755` for all four files, and `git diff --summary` prints no mode change.+- [The upper bound must be raised by hand for MongoDB 10] → This is intended. Raising it is the moment someone checks that the bundled tools support the new major, which is the checklist in `assets/tools/AGENTS.md`.++## Migration Plan++No data migration. Stored identities `4` to `8` are unchanged, and the API shape stays the same. Rolling back means reverting the commit, which brings the old binaries and code back together. The old code does not know identity `9`: its connection test refuses a MongoDB 9 server again, and its restore guard orders a stored `9` as 0. A database added as MongoDB 9 before a rollback should therefore be removed or left without restores until support returns.diff --git a/openspec/changes/support-mongodb-9/proposal.md b/openspec/changes/support-mongodb-9/proposal.mdnew file mode 100644index 00000000..ece72925--- /dev/null+++ b/openspec/changes/support-mongodb-9/proposal.md@@ -0,0 +1,47 @@+## Why++Databasus refuses to add a MongoDB 9.x database: the connection test fails with `unsupported MongoDB version: 9.0 (supported: 4.2+, 5.x, 6.x, 7.x, 8.x)`. MongoDB 9.0 is released (the `mongo:9.0.2` image is current), so anyone running it cannot back it up. Accepting the version is not enough on its own. The bundled MongoDB Database Tools are 100.16.1, and server 9.0 support first appeared in 100.18.0, so the client has to move before the server can be accepted.++The same refresh closes a security exception that has already lapsed. `.trivyignore.yaml` silences CVE-2026-56854 for the 100.16.1 binaries, which carry `golang.org/x/crypto` v0.45.0, and that exception expired on 2026-10-05. Database Tools 100.19.1 carry `x/crypto` v0.57.0, past the fixed version, so the exception can be deleted instead of renewed.++## What Changes++- Accept a MongoDB server reporting major version 9 and record it under a new version identity `9`.+- Replace the bundled `mongodump` and `mongorestore` on both architectures with MongoDB Database Tools 100.19.1. Both architectures come from the same upstream build family, `ubuntu2204`, and the download URL and archive checksum of each are recorded in `assets/tools/README.md`. The current binaries match no published 100.16.1 archive we checked, so their origin is unknown today.+- Make the MongoDB restore downgrade guard compare version identities by their numbers, the way the MySQL and MariaDB guards already do. Today it looks the identity up in a table, and an identity missing from that table orders as 0, so forgetting to extend the table would let a MongoDB 9 backup restore onto an 8 server without a word.+- Delete `GetMongodbVersionEnum`, which nothing outside its own file calls. It is a second version table that would need a `9` entry for no caller.+- Correct the frontend MongoDB version values to the identities the backend actually sends (`4` to `9`). The frontend currently declares `4.2`, `4.4`, `5.0` and so on, none of which the backend ever produces. No screen renders the MongoDB version, so nothing visible changes.+- Delete the expired CVE-2026-56854 exception from `.trivyignore.yaml`.+- Add MongoDB 9.0 to the backend test matrices that boot a real server, and update the supported-version lists in the READMEs, `SECURITY.md`, the website's MongoDB page and `llms.txt`.++Nothing here is BREAKING. Stored MongoDB databases keep their recorded identities `4` to `8`, the API shape is unchanged, and the renamed frontend values were never matched against data.++## Capabilities++### New Capabilities++None.++### Modified Capabilities++- `database-version-support`: gains MongoDB requirements. The spec covers MySQL and MariaDB only, so it gets the accepted MongoDB versions, the refusal of versions below 4.2 and above 9, and the restore downgrade guard for MongoDB.+- `client-tool-bundles`: the requirement that every accepted version identity has a designated client on every architecture is extended to MongoDB, whose single Database Tools bundle serves every accepted server version and is held to the vendor's compatibility statement rather than to release lines. A new security requirement makes the shipped MongoDB tools traceable: they are byte-identical to a vendor archive whose address and checksum the client documentation records, and both architectures come from the same release and build family.++## Out of scope++- A version check for the MongoDB bundle at startup. The bundle is not named after a server release line, so the startup check only confirms the tools start; adding a pinned Database Tools version check is a separate decision.+- A refresh script for the MongoDB bundle like the MariaDB one. Each architecture is one upstream archive, so a recorded URL and checksum give the same reproducibility.+- Showing the MongoDB version in the database view.+- Changing the shared MongoDB test container image (`mongo:8.2.3-noble`) or the SSL test, which stay on MongoDB 8.+- Editing accepted ADRs. ADR-0005 and ADR-0013 record the matrix as it was when they were decided.+- Any other engine's bundle or version list.++## Impact++- **Module rules this change answers to:** the root `AGENTS.md`, `backend/AGENTS.md`, `frontend/AGENTS.md`, `website/AGENTS.md`, `assets/readme/AGENTS.md` and `assets/tools/AGENTS.md`.+- **Binaries:** `assets/tools/{x64,arm}/mongodb/bin/{mongodump,mongorestore}` change for every MongoDB server, not only 9.x, because one bundle serves them all. The whole MongoDB matrix has to pass on the new client.+- **Backend:** `backend/internal/util/tools/mongodb.go`, the version detection in `backend/internal/features/databases/databases/mongodb/model.go`, the restore guard call in `backend/internal/features/restores/service.go` and the MongoDB test matrices.+- **Frontend:** `frontend/src/entity/databases/model/mongodb/MongodbVersion.ts` and the one test that uses it.+- **CI:** the blocking Trivy image scan no longer depends on the expired exception.+- **Main spec Purpose:** `openspec/specs/database-version-support/spec.md` names only MySQL and MariaDB in its Purpose, which a delta cannot change, so its Purpose line is updated directly to include MongoDB.+- **Docs:** root `README.md` and the five copies under `assets/readme/`, `.github/SECURITY.md`, `assets/tools/README.md`, `website/public/llms.txt`, and the website MongoDB page with its five translations.diff --git a/openspec/changes/support-mongodb-9/specs/client-tool-bundles/spec.md b/openspec/changes/support-mongodb-9/specs/client-tool-bundles/spec.mdnew file mode 100644index 00000000..c7acbcc5--- /dev/null+++ b/openspec/changes/support-mongodb-9/specs/client-tool-bundles/spec.md@@ -0,0 +1,50 @@+## ADDED Requirements++### Requirement: The MongoDB client tools are the vendor's unmodified build from a recorded source++The system SHALL ship MongoDB client tools that are byte-identical to the programs inside an archive the vendor publishes, and the client documentation SHALL record, for each architecture, the tools release, the archive's download address and the archive's published checksum. Both architectures SHALL come from the same tools release and the same vendor build family, so that one documented release means one build on every architecture.++#### Scenario: An operator verifies the shipped MongoDB tools++- **WHEN** an operator downloads the archive the client documentation names for an architecture and checks it against the recorded checksum+- **THEN** the checksum matches, and the shipped dump and restore programs for that architecture are byte-identical to the ones in the archive++#### Scenario: Both architectures carry the same tools release++- **WHEN** the version embedded in the shipped MongoDB dump and restore programs is read for each supported architecture+- **THEN** every program carries the tools release the client documentation records++## MODIFIED Requirements++### Requirement: Every accepted version identity has a designated client on every supported architecture++The system SHALL ship, for each processor architecture it runs on, a client designated to dump and restore every MySQL, MariaDB and MongoDB version identity it accepts.++For MySQL and MariaDB, the designated client is either the one built for that identity's own release line, or a client from another line documented as serving it — a newer one, as the modern MariaDB client serves every line from 10.2 up, or an older one, as the legacy MariaDB client serves the lines the modern client cannot dump. A MySQL or MariaDB client MAY trail the server inside a single release line, and SHALL never come from a line older than the server's own.++MongoDB clients are numbered independently of server release lines, so the release-line clauses above do not apply to them. MongoDB is served by a single client for every accepted identity, and that client SHALL be a release whose vendor compatibility statement lists every MongoDB major line the system accepts.++#### Scenario: Start on a supported architecture++- **WHEN** the product starts on either supported architecture+- **THEN** it reports each expected client set as verified, except for a client set documented as unavailable on that architecture++#### Scenario: A version identity served by a newer client++- **WHEN** a version identity has no client built specifically for it and a newer shipped client is designated to serve it+- **THEN** the system serves it with that client, and the designation is recorded in the client documentation++#### Scenario: A version identity served by an older client on purpose++- **WHEN** a version identity exists for servers a newer client cannot dump, as MariaDB 5.5 and 10.1 need a client older than 10.2+- **THEN** the product ships a client from a line that can dump them on every architecture, and that client is used for those identities++#### Scenario: An architecture with no client for a version identity++- **WHEN** an architecture ships no client able to serve a version identity, as arm64 ships none for MySQL 5.7+- **THEN** that identity is unsupported on that architecture and a server reporting it is refused rather than attempted++#### Scenario: One MongoDB client serves every accepted MongoDB identity++- **WHEN** a backup or restore runs for a MongoDB database of any accepted identity, from 4 to 9, on either supported architecture+- **THEN** the shipped MongoDB tools perform it, and the vendor's compatibility statement for that tools release lists the server's major linediff --git a/openspec/changes/support-mongodb-9/specs/database-version-support/spec.md b/openspec/changes/support-mongodb-9/specs/database-version-support/spec.mdnew file mode 100644index 00000000..1c33e12d--- /dev/null+++ b/openspec/changes/support-mongodb-9/specs/database-version-support/spec.md@@ -0,0 +1,70 @@+## ADDED Requirements++### Requirement: Supported MongoDB server versions are accepted++The system SHALL accept a MongoDB server reporting version 4.2 or later up to and including the 9 line, and SHALL record a version identity that is the server's major version alone, so that every release inside one major line shares one identity.++#### Scenario: Add a MongoDB 9 server++- **WHEN** an authorized user tests the connection to a reachable MongoDB server reporting version 9.0 with sufficient backup privileges+- **THEN** the connection test succeeds and the database records a version identity of 9++#### Scenario: A later minor inside the MongoDB 9 line++- **WHEN** an authorized user tests the connection to a MongoDB server reporting a 9.x version later than 9.0, such as 9.2+- **THEN** the connection test succeeds and the database records a version identity of 9++#### Scenario: Add a MongoDB server on a previously supported line++- **WHEN** an authorized user tests the connection to a reachable MongoDB server reporting version 4.2, 4.4, 5.x, 6.x, 7.x or 8.x with sufficient backup privileges+- **THEN** the connection test succeeds and the database records the server's major version as its identity++#### Scenario: A database recorded before this change++- **WHEN** the product starts with MongoDB databases recorded under identities 4 to 8, and a backup and a restore run for one of them+- **THEN** the database keeps its recorded identity, and the backup and the restore succeed with the shipped MongoDB client++### Requirement: A MongoDB server outside the supported range is refused with a reason++The system SHALL refuse a MongoDB server older than 4.2 or newer than the 9 line, and SHALL name the version it found and the range it supports, so that no backup is attempted against a server whose major line the shipped client's vendor compatibility statement does not list. Inside an accepted major line the server may be newer than the releases that statement names, such as 9.2 against a client listed for 9.0: that gap is closed by refreshing the client, not by refusing the database.++#### Scenario: MongoDB server below 4.2++- **WHEN** an authorized user tests the connection to a MongoDB server reporting version 4.0 or 3.6+- **THEN** the connection test fails, reports the version it found, names 4.2 as the minimum supported version, and no database is added++#### Scenario: MongoDB server above the newest supported line++- **WHEN** an authorized user tests the connection to a MongoDB server reporting version 10.0+- **THEN** the connection test fails, reports the version it found and the supported range, and no database is added++#### Scenario: MongoDB version string cannot be read++- **WHEN** the MongoDB server answers the version query with a value the system cannot parse+- **THEN** the connection test fails and reports the value it received++## MODIFIED Requirements++### Requirement: The downgrade guard covers every accepted version++The system SHALL refuse to restore a backup taken from a newer server onto an older server for every MySQL, MariaDB and MongoDB version it accepts, including versions added after the guard was written.++#### Scenario: Restore a calendar-scheme MySQL backup onto an earlier line++- **WHEN** an authorized user requests a restore of a backup taken from a MySQL 26.x server onto a MySQL 9.x or 8.x server+- **THEN** the system refuses the restore and explains that the backup comes from a newer server++#### Scenario: Restore a MariaDB 13 backup onto MariaDB 12++- **WHEN** an authorized user requests a restore of a backup taken from a MariaDB 13.x server onto a MariaDB 12.x server+- **THEN** the system refuses the restore and explains that the backup comes from a newer server++#### Scenario: Restore a MongoDB 9 backup onto MongoDB 8++- **WHEN** an authorized user requests a restore of a backup taken from a MongoDB 9.x server onto a MongoDB 8.x server+- **THEN** the system refuses the restore and explains that the backup comes from a newer server++#### Scenario: Restore onto an equal or newer server++- **WHEN** an authorized user requests a restore of a backup onto a server of the same or a newer version identity+- **THEN** the system allows the restorediff --git a/openspec/changes/support-mongodb-9/tasks.md b/openspec/changes/support-mongodb-9/tasks.mdnew file mode 100644index 00000000..55c7523a--- /dev/null+++ b/openspec/changes/support-mongodb-9/tasks.md@@ -0,0 +1,46 @@+## 1. MongoDB client bundle++The arm64 binaries cannot run on an amd64 host without emulation. Their version is read with `go version -m` and `strings` instead, and the product's startup check runs them on a real arm64 build.++- [ ] 1.1 Download `https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.19.1.tgz` and `https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-arm64-100.19.1.tgz` into a new empty directory outside the repository. Verify that `sha256sum` of each archive equals the `sha256` listed for it in `https://downloads.mongodb.org/tools/db/release.json` (`8312f251c360ddfbcdd430c64758bee58b7050e1041e8c9df2906761098acd49` for x86_64, `e5d37e679ff815c45a86c17bc17de200c3a215a6eafc82516e5ba271f563373e` for arm64)+- [ ] 1.2 Copy `bin/mongodump` and `bin/mongorestore` from each archive over `assets/tools/x64/mongodb/bin/` and `assets/tools/arm/mongodb/bin/` without modifying them. Verify that `sha256sum` of each copied file equals the file inside its archive+- [ ] 1.3 Verify the x64 pair starts in the runtime image and reports `100.19.1`: `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 libgssapi-krb5-2 >/dev/null && /tools/x64/mongodb/bin/mongodump --version && /tools/x64/mongodb/bin/mongorestore --version'`+- [ ] 1.4 Verify the arm pair without running it: `go version -m` shows `golang.org/x/crypto` v0.57.0, `strings` finds `100.19.1`, `objdump -T` shows no `GLIBC_2.x` above 2.34, and `objdump -p` lists no `NEEDED` library beyond `libc.so.6`, `ld-linux-aarch64.so.1` and `libgssapi_krb5.so.2`+- [ ] 1.5 Verify all four files are executable in the working tree and that git sees no mode change: `stat -c '%a %n' assets/tools/{x64,arm}/mongodb/bin/*` shows `755` for every file, and `git diff --summary -- assets/tools/x64/mongodb assets/tools/arm/mongodb` prints no `mode change` line+- [ ] 1.6 In `assets/tools/README.md`, replace the 100.16.1 paragraph with a MongoDB source table that lists the tools release, the build family `ubuntu2204`, and the download URL and archive `sha256` for each architecture. Change the server range to 4.2 to 9.0, as the vendor states for 100.19.1. Verify by checking that the table's checksums match the ones verified in 1.1+- [ ] 1.7 Delete the CVE-2026-56854 entry and the now-empty `vulnerabilities:` key from `.trivyignore.yaml`, keeping the file's final newline. Verify with `trivy rootfs --scanners vuln --severity CRITICAL --exit-code 1 assets/tools/x64/mongodb` and the same for `assets/tools/arm/mongodb`, if `trivy` is installed; otherwise verify with the `go version -m` output from 1.4 that `x/crypto` is at or above v0.55.0++## 2. Backend version identity and restore guard++- [ ] 2.1 Add `MongodbVersion9` to `backend/internal/util/tools/mongodb.go`, delete `GetMongodbVersionEnum`, and update the comment on `GetMongodbExecutable` to the 4.2 to 9.x range. Verify with `go build ./...` in `backend/`+- [ ] 2.2 Rewrite `mapMongodbVersion` in `backend/internal/features/databases/databases/mongodb/model.go` to take the whole version string from `buildInfo`, as design D3 describes, and make `detectMongodbVersion` pass that string straight through. The function parses the leading `major.minor` as integers, refuses anything below 4.2 or above one named upper-bound constant set to 9, and otherwise returns the major as the identity. Update the comment that names the tools release. Rewrite `Test_MapMongodbVersion_VersionMatrix_ReturnsExpected` to take a version string per case, and rename its `got`/`wantErr`/`wantVersion` fields to domain names as `backend/AGENTS.md` asks of touched tests. The table holds:+ - accepted: `4.2.0` and `4.4.29` → `MongodbVersion4`, `5.0.0` → `MongodbVersion5`, `6.0.0` → `MongodbVersion6`, `7.0.0` → `MongodbVersion7`, `8.0.0` and `8.10.1` → `MongodbVersion8`, `9.0.2` and `9.2.0` → `MongodbVersion9`. The existing `9.0 rejected` case flips to accepted;+ - refused below the minimum: `3.6.23`, `4.0.28` and `4.1.0`, each with an error containing the version found (`3.6`, `4.0`, `4.1`) and `minimum supported: 4.2`;+ - refused above the bound: `10.0.0`, with an error containing `10.0` and `supported: 4.2 through 9.x`;+ - unreadable: `abc` and an empty string, each with an error containing `could not parse MongoDB version` and the value received.++ Verify with `just test-package ./internal/features/databases/databases/mongodb/...` in `backend/`+- [ ] 2.3 Make `IsMongodbBackupVersionHigherThanRestoreVersion` return `(bool, error)` and delegate to `compareReleaseLines`, like the MySQL guard. Update the caller in `backend/internal/features/restores/service.go` to return the error. Add `backend/internal/util/tools/mongodb_test.go` covering 9 onto 8 refused, 8 onto 9 allowed, 9 onto 9 allowed, 4 onto 9 allowed, and an unreadable identity returning an error, named after the MySQL tests in `mysql_test.go`. Verify with `just test-package ./internal/util/tools/... ./internal/features/restores/...` in `backend/`+- [ ] 2.4 Update the fake client output in `backend/internal/util/tools/common_test.go` from `100.16.1` to `100.19.1`. Verify with `just test-package ./internal/util/tools/...` in `backend/`++## 3. Real-server test matrices++- [ ] 3.1 Add `{"MongoDB 9.0", tools.MongodbVersion9, "mongo:9.0.2-noble"}` to `mongodbModelVersions` in `model_test.go` and to `mongodbVersions` in `backend/internal/features/tests/logical/mongodb/backup_restore_test.go`, then pull the image with `docker pull mongo:9.0.2-noble`. Verify with `just test-package ./internal/features/databases/databases/mongodb/...` in `backend/`+- [ ] 3.2 Run the whole MongoDB backup and restore matrix on the new binaries, because the refreshed client serves every version and not only 9. Verify with `just test-package ./internal/features/tests/logical/mongodb/...` in `backend/`++## 4. Frontend identity values++- [ ] 4.1 Change `frontend/src/entity/databases/model/mongodb/MongodbVersion.ts` to the identities the backend sends, `MongodbVersion4 = '4'` through `MongodbVersion9 = '9'`, and update the member used in `disableSrvWhenTunneled.test.ts`. Verify with `pnpm typecheck`, `pnpm lint` and `pnpm test` in `frontend/`++## 5. Documentation++- [ ] 5.1 Add 9 to the MongoDB line in the root `README.md` and in all five copies under `assets/readme/`, following each locale's own list punctuation (the Chinese copy uses `、`), as `assets/readme/AGENTS.md` requires. Verify with `grep -n 'MongoDB' README.md assets/readme/README.*.md` showing 9 on line 118 of every file+- [ ] 5.2 Add 9 to `.github/SECURITY.md` and to the MongoDB entry in `website/public/llms.txt`. Verify with `grep -n 'MongoDB' .github/SECURITY.md website/public/llms.txt`+- [ ] 5.3 Add 9 to every version list on the English MongoDB page `website/app/(en)/mongodb-backup/page.tsx`: the feature list, both FAQ answers, the versions paragraph, and a `MongoDB 9` badge after `MongoDB 8`. Verify with `pnpm lint` in `website/`+- [ ] 5.4 Mirror 5.3 in the five copies under `website/app/[lang]/mongodb-backup/content/`, following each locale's conventions in `website/AGENTS.md` and keeping heading anchors unchanged. Verify that `grep -nE '7 (и|y|e|et|and) 8|7 和 8' website/app/\(en\)/mongodb-backup/page.tsx website/app/\[lang\]/mongodb-backup/content/*.tsx` finds no list that still stops at 8, then run `pnpm lint` and `pnpm build` in `website/`++## 6. Close-out++- [ ] 6.1 Update the Purpose line of `openspec/specs/database-version-support/spec.md` to name MySQL, MariaDB and MongoDB, since a delta spec cannot change it. Verify with `openspec validate support-mongodb-9 --strict`+- [ ] 6.2 Run `just lint` at the repository root and `just format` for the touched modules, then confirm `git status` shows no formatter changes outside this change's files+- [ ] 6.3 Confirm that `grep -rn '100\.16\.1' --exclude-dir=openspec --exclude-dir=node_modules .` and `grep -rnE 'MongodbVersion(42|44|[5-8]0)\b' frontend/src` find nothing, so no stale tools version or old frontend member remains