PostgreSQL backup tool with Point-In-Time-Recovery and restore verification
TypeScript backupbackupsdatabasedatabase-backupdevopsdockergolangkubernetesmariadbmongodbmysqlpgpostgrespostgresqls3self-hostedsystem-administrationtoolsweb-ui
FEATURE (mongodb): Support MongoDB 9 with Database Tools 100.19.1 from a recorded vendor source, so 9.x servers get backups and restores refuse 9 onto 8
Rostislav Dugind9e47e9ab6b7
diff --git a/.github/SECURITY.md b/.github/SECURITY.mdindex d30ed6bd..b5752914 100644--- a/.github/SECURITY.md+++ b/.github/SECURITY.md@@ -39,7 +39,7 @@ Databasus supports MariaDB versions 10 and 11.### MongoDB Compatibility-Databasus supports MongoDB versions 4, 5, 6, 7 and 8.+Databasus supports MongoDB versions 4, 5, 6, 7, 8 and 9.## Response Timelinediff --git a/.trivyignore.yaml b/.trivyignore.yamlindex 2a450e44..f6be187e 100644--- a/.trivyignore.yaml+++ b/.trivyignore.yaml@@ -7,17 +7,3 @@ misconfigurations:the application process to databasus with gosu. The entrypoint must startas root to remap PUID and PGID values, prepare the mounted data directory,and initialize PostgreSQL. A Dockerfile USER directive would break startup.--vulnerabilities:- - id: CVE-2026-56854- paths:- - app/assets/tools/x64/mongodb/bin/mongodump- - app/assets/tools/x64/mongodb/bin/mongorestore- - app/assets/tools/arm/mongodb/bin/mongodump- - app/assets/tools/arm/mongodb/bin/mongorestore- statement: >-- MongoDB Database Tools 100.16.1 include golang.org/x/crypto as an indirect- dependency, but these binaries do not contain the affected ssh.NewServerConn- server symbol. Trivy reports the module version without checking symbol- reachability. Reassess when MongoDB publishes tools built with x/crypto 0.55.0.- expired_at: 2026-10-05diff --git a/README.md b/README.mdindex 10d6a616..1c3d439a 100644--- a/README.md+++ b/README.md@@ -115,7 +115,7 @@ Databasus performs a real restore to confirm backups are usable, not just intact- **PostgreSQL**: 14, 15, 16, 17 and 18 (physical and logical)- **MySQL**: 5.7, 8.0, 8.4, 9 and 26 (logical only)- **MariaDB**: 5.5, 10, 11, 12 and 13 (logical only)-- **MongoDB**: 4.2+, 5, 6, 7 and 8 (logical only)+- **MongoDB**: 4.2+, 5, 6, 7, 8 and 9 (logical only)### 🐳 **Self-hosted & secure**diff --git a/assets/readme/README.es.md b/assets/readme/README.es.mdindex 95ce038f..1dcbfa4b 100644--- a/assets/readme/README.es.md+++ b/assets/readme/README.es.md@@ -115,7 +115,7 @@ Databasus ejecuta una restauración real para confirmar que las copias sirven, e- **PostgreSQL**: 14, 15, 16, 17 y 18 (física y lógica)- **MySQL**: 5.7, 8.0, 8.4, 9 y 26 (solo lógica)- **MariaDB**: 5.5, 10, 11, 12 y 13 (solo lógica)-- **MongoDB**: 4.2+, 5, 6, 7 y 8 (solo lógica)+- **MongoDB**: 4.2+, 5, 6, 7, 8 y 9 (solo lógica)### 🐳 **Autoalojado y seguro**diff --git a/assets/readme/README.fr.md b/assets/readme/README.fr.mdindex 3c256521..efabfef1 100644--- a/assets/readme/README.fr.md+++ b/assets/readme/README.fr.md@@ -115,7 +115,7 @@ Databasus effectue une vraie restauration pour confirmer que les sauvegardes son- **PostgreSQL** : 14, 15, 16, 17 et 18 (physique et logique)- **MySQL** : 5.7, 8.0, 8.4, 9 et 26 (logique uniquement)- **MariaDB** : 5.5, 10, 11, 12 et 13 (logique uniquement)-- **MongoDB** : 4.2+, 5, 6, 7 et 8 (logique uniquement)+- **MongoDB** : 4.2+, 5, 6, 7, 8 et 9 (logique uniquement)### 🐳 **Auto-hébergé et sûr**diff --git a/assets/readme/README.pt.md b/assets/readme/README.pt.mdindex 0c4d7252..eee4ea44 100644--- a/assets/readme/README.pt.md+++ b/assets/readme/README.pt.md@@ -115,7 +115,7 @@ O Databasus faz uma restauração de verdade para confirmar que os backups serve- **PostgreSQL**: 14, 15, 16, 17 e 18 (físico e lógico)- **MySQL**: 5.7, 8.0, 8.4, 9 e 26 (apenas lógico)- **MariaDB**: 5.5, 10, 11, 12 e 13 (apenas lógico)-- **MongoDB**: 4.2+, 5, 6, 7 e 8 (apenas lógico)+- **MongoDB**: 4.2+, 5, 6, 7, 8 e 9 (apenas lógico)### 🐳 **Self-hosted e seguro**diff --git a/assets/readme/README.ru.md b/assets/readme/README.ru.mdindex 574ddb0c..93e6abf5 100644--- a/assets/readme/README.ru.md+++ b/assets/readme/README.ru.md@@ -115,7 +115,7 @@ Databasus по-настоящему восстанавливает бекап,- **PostgreSQL**: 14, 15, 16, 17 и 18 (физические и логические)- **MySQL**: 5.7, 8.0, 8.4, 9 и 26 (только логические)- **MariaDB**: 5.5, 10, 11, 12 и 13 (только логические)-- **MongoDB**: 4.2+, 5, 6, 7 и 8 (только логические)+- **MongoDB**: 4.2+, 5, 6, 7, 8 и 9 (только логические)### 🐳 **Self-hosted и безопасно**diff --git a/assets/readme/README.zh.md b/assets/readme/README.zh.mdindex d4765f22..78cab211 100644--- a/assets/readme/README.zh.md+++ b/assets/readme/README.zh.md@@ -115,7 +115,7 @@ Databasus 会真正执行一次恢复,确认备份可用,而不只是检查- **PostgreSQL**:14、15、16、17 和 18(物理和逻辑)- **MySQL**:5.7、8.0、8.4、9 和 26(仅逻辑)- **MariaDB**:5.5、10、11、12 和 13(仅逻辑)-- **MongoDB**:4.2+、5、6、7 和 8(仅逻辑)+- **MongoDB**:4.2+、5、6、7、8 和 9(仅逻辑)### 🐳 **自托管且安全**diff --git a/assets/tools/README.md b/assets/tools/README.mdindex 6951895d..d15153d4 100644--- a/assets/tools/README.md+++ b/assets/tools/README.md@@ -84,9 +84,19 @@ MariaDB ships three client tiers, mapped to server versions in- `12.3` (modern) serves every line from 10.2 through 12.x.- `13.0` serves the 13 line, which the 12.3 client predates.-MongoDB Database Tools are version 100.16.1 across all arches and are-backward-compatible with all supported server versions (4.2 – 8.2). MongoDB-4.0 is not supported (wire version 7, requires older mongodump).+Bundled MongoDB Database Tools, `mongodump` and `mongorestore` copied+unmodified from the vendor's `ubuntu2204` archives listed in+`https://downloads.mongodb.org/tools/db/release.json`:++| arch | release | archive | archive sha256 |+|-------|----------|---------------------------------------------------------------------------------------------------|--------------------------------------------------------------------|+| `x64` | 100.19.1 | `https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.19.1.tgz` | `8312f251c360ddfbcdd430c64758bee58b7050e1041e8c9df2906761098acd49` |+| `arm` | 100.19.1 | `https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-arm64-100.19.1.tgz` | `e5d37e679ff815c45a86c17bc17de200c3a215a6eafc82516e5ba271f563373e` |++One release serves every supported server: the vendor lists 4.2 through 9.0+for 100.19.1, and the backend accepts every release of the 9 line. Take both+architectures from the same build family; `debian12` has no arm64 archive.+MongoDB 4.0 is not supported (wire version 7, requires older mongodump).Notes:- MySQL `5.7` is amd64-only — `arm/mysql/mysql-5.7/` is intentionally absent,@@ -95,7 +105,7 @@ Notes:Shared libraries the binaries need from the runtime image(`debian:bookworm-slim`, glibc 2.36; every bundled binary targets glibc 2.28-or lower):+or lower, except the MongoDB tools, whose `ubuntu2204` build needs glibc 2.34):| library | needed by ||-------------------------------------|----------------------------------------------|diff --git a/assets/tools/arm/mongodb/bin/mongodump b/assets/tools/arm/mongodb/bin/mongodumpindex b0bb79d2..87bb5101 100755Binary files a/assets/tools/arm/mongodb/bin/mongodump and b/assets/tools/arm/mongodb/bin/mongodump differdiff --git a/assets/tools/arm/mongodb/bin/mongorestore b/assets/tools/arm/mongodb/bin/mongorestoreindex 6e9e859b..f6f6359a 100755Binary files a/assets/tools/arm/mongodb/bin/mongorestore and b/assets/tools/arm/mongodb/bin/mongorestore differdiff --git a/assets/tools/x64/mongodb/bin/mongodump b/assets/tools/x64/mongodb/bin/mongodumpindex 9ffddbca..69c1911a 100755Binary files a/assets/tools/x64/mongodb/bin/mongodump and b/assets/tools/x64/mongodb/bin/mongodump differdiff --git a/assets/tools/x64/mongodb/bin/mongorestore b/assets/tools/x64/mongodb/bin/mongorestoreindex e9a8ddc3..5f7cc682 100755Binary files a/assets/tools/x64/mongodb/bin/mongorestore and b/assets/tools/x64/mongodb/bin/mongorestore differdiff --git a/backend/internal/features/databases/databases/mongodb/model.go b/backend/internal/features/databases/databases/mongodb/model.goindex 36181c7c..1ccecc97 100644--- a/backend/internal/features/databases/databases/mongodb/model.go+++ b/backend/internal/features/databases/databases/mongodb/model.go@@ -8,6 +8,7 @@ import ("net/url""regexp""slices"+ "strconv""time""github.com/google/uuid"@@ -610,6 +611,13 @@ func (m *MongodbDatabase) buildURI(password string, includeDatabase bool) string)}+// newestSupportedMongodbMajor is the newest major line the bundled MongoDB+// Database Tools list in their compatibility statement; raise it only with a+// tools release that lists the next line.+const newestSupportedMongodbMajor = 9++var mongodbMajorMinorPattern = regexp.MustCompile(`^(\d+)\.(\d+)`)+// detectMongodbVersion gets MongoDB server version from buildInfo commandfunc detectMongodbVersion(ctx context.Context, client *mongo.Client) (tools.MongodbVersion, error) {adminDB := client.Database("admin")@@ -624,43 +632,40 @@ func detectMongodbVersion(ctx context.Context, client *mongo.Client) (tools.Mongreturn "", errors.New("could not parse MongoDB version from buildInfo")}- re := regexp.MustCompile(`^(\d+)\.(\d+)`)- matches := re.FindStringSubmatch(versionStr)+ return mapMongodbVersion(versionStr)+}++// mapMongodbVersion validates a reported server version against the supported+// range. The bundled MongoDB Database Tools drop wire-protocol v7, so the+// minimum supported server version is 4.2 — see assets/tools/README.md for the+// bundled release.+func mapMongodbVersion(reportedVersion string) (tools.MongodbVersion, error) {+ matches := mongodbMajorMinorPattern.FindStringSubmatch(reportedVersion)if len(matches) < 3 {- return "", fmt.Errorf("could not parse MongoDB version: %s", versionStr)+ return "", fmt.Errorf("could not parse MongoDB version: %q", reportedVersion)}- return mapMongodbVersion(matches[1], matches[2])-}+ major, majorErr := strconv.Atoi(matches[1])+ minor, minorErr := strconv.Atoi(matches[2])+ if majorErr != nil || minorErr != nil {+ return "", fmt.Errorf("could not parse MongoDB version: %q", reportedVersion)+ }-// mapMongodbVersion validates a parsed major.minor against the supported-// matrix. The bundled MongoDB Database Tools (100.16.1) drop wire-protocol-// v7, so the minimum supported server version is 4.2 — matching-// assets/tools/README.md.-func mapMongodbVersion(major, minor string) (tools.MongodbVersion, error) {- switch major {- case "4":- if minor == "0" || minor == "1" {- return "", fmt.Errorf(- "unsupported MongoDB version: %s.%s (minimum supported: 4.2)",- major, minor,- )- }- return tools.MongodbVersion4, nil- case "5":- return tools.MongodbVersion5, nil- case "6":- return tools.MongodbVersion6, nil- case "7":- return tools.MongodbVersion7, nil- case "8":- return tools.MongodbVersion8, nil- default:+ if major < 4 || (major == 4 && minor < 2) {return "", fmt.Errorf(- "unsupported MongoDB version: %s.%s (supported: 4.2+, 5.x, 6.x, 7.x, 8.x)",+ "unsupported MongoDB version: %d.%d (minimum supported: 4.2)",major, minor,)}++ if major > newestSupportedMongodbMajor {+ return "", fmt.Errorf(+ "unsupported MongoDB version: %d.%d (supported: 4.2 through %d.x)",+ major, minor, newestSupportedMongodbMajor,+ )+ }++ return tools.MongodbVersion(strconv.Itoa(major)), nil}func decryptPasswordIfNeeded(diff --git a/backend/internal/features/databases/databases/mongodb/model_test.go b/backend/internal/features/databases/databases/mongodb/model_test.goindex 906725a9..da039ebe 100644--- a/backend/internal/features/databases/databases/mongodb/model_test.go+++ b/backend/internal/features/databases/databases/mongodb/model_test.go@@ -32,6 +32,7 @@ var mongodbModelVersions = []mongodbModelVersion{{"MongoDB 6.0", tools.MongodbVersion6, "mongo:6.0"},{"MongoDB 7.0", tools.MongodbVersion7, "mongo:7.0"},{"MongoDB 8.2", tools.MongodbVersion8, "mongo:8.2.3-noble"},+ {"MongoDB 9.0", tools.MongodbVersion9, "mongo:9.0.2-noble"},}// Test_MongodbModel_AcrossSupportedVersions boots each MongoDB version once and runs every matrix@@ -158,7 +159,6 @@ func testTestConnectionSufficientPermissions(port := container.PortmongodbModel := &MongodbDatabase{- Version: version,Host: container.Host,Port: &port,Username: backupUsername,@@ -174,6 +174,7 @@ func testTestConnectionSufficientPermissions(err = mongodbModel.TestConnection(logger, nil)assert.NoError(t, err)+ assert.Equal(t, version, mongodbModel.Version)}func testShouldSuggestReadOnlyUserAdminUser(@@ -816,39 +817,45 @@ func Test_MapMongodbVersion_VersionMatrix_ReturnsExpected(t *testing.T) {t.Parallel()cases := []struct {- name string- major string- minor string- wantErr bool- wantVersion tools.MongodbVersion- errContains string+ name string+ reportedVersion string+ isRefused bool+ mappedVersion tools.MongodbVersion+ errorFragments []string}{- {"3.6 rejected", "3", "6", true, "", "supported: 4.2+"},- {"4.0 rejected", "4", "0", true, "", "minimum supported: 4.2"},- {"4.1 rejected", "4", "1", true, "", "minimum supported: 4.2"},- {"4.2 supported", "4", "2", false, tools.MongodbVersion4, ""},- {"4.4 supported", "4", "4", false, tools.MongodbVersion4, ""},- {"5.0 supported", "5", "0", false, tools.MongodbVersion5, ""},- {"6.0 supported", "6", "0", false, tools.MongodbVersion6, ""},- {"7.0 supported", "7", "0", false, tools.MongodbVersion7, ""},- {"8.0 supported", "8", "0", false, tools.MongodbVersion8, ""},- {"9.0 rejected", "9", "0", true, "", "supported: 4.2+"},+ {"4.2 supported", "4.2.0", false, tools.MongodbVersion4, nil},+ {"4.4 supported", "4.4.29", false, tools.MongodbVersion4, nil},+ {"5.0 supported", "5.0.0", false, tools.MongodbVersion5, nil},+ {"6.0 supported", "6.0.0", false, tools.MongodbVersion6, nil},+ {"7.0 supported", "7.0.0", false, tools.MongodbVersion7, nil},+ {"8.0 supported", "8.0.0", false, tools.MongodbVersion8, nil},+ {"8.10 supported", "8.10.1", false, tools.MongodbVersion8, nil},+ {"9.0 supported", "9.0.2", false, tools.MongodbVersion9, nil},+ {"9.2 supported", "9.2.0", false, tools.MongodbVersion9, nil},+ {"3.6 rejected", "3.6.23", true, "", []string{"3.6", "minimum supported: 4.2"}},+ {"4.0 rejected", "4.0.28", true, "", []string{"4.0", "minimum supported: 4.2"}},+ {"4.1 rejected", "4.1.0", true, "", []string{"4.1", "minimum supported: 4.2"}},+ {"10.0 rejected", "10.0.0", true, "", []string{"10.0", "supported: 4.2 through 9.x"}},+ {"unreadable rejected", "abc", true, "", []string{"could not parse MongoDB version", "abc"}},+ {"empty rejected", "", true, "", []string{"could not parse MongoDB version", `""`}},}for _, tc := range cases {t.Run(tc.name, func(t *testing.T) {t.Parallel()- got, err := mapMongodbVersion(tc.major, tc.minor)+ mappedVersion, err := mapMongodbVersion(tc.reportedVersion)- if tc.wantErr {+ if tc.isRefused {assert.Error(t, err)- assert.Contains(t, err.Error(), tc.errContains)+ for _, fragment := range tc.errorFragments {+ assert.Contains(t, err.Error(), fragment)+ }return}assert.NoError(t, err)- assert.Equal(t, tc.wantVersion, got)+ assert.Equal(t, tc.mappedVersion, mappedVersion)})}}diff --git a/backend/internal/features/restores/service.go b/backend/internal/features/restores/service.goindex 241608fc..f2314fd0 100644--- a/backend/internal/features/restores/service.go+++ b/backend/internal/features/restores/service.go@@ -303,10 +303,14 @@ func (s *RestoreService) validateVersionCompatibility(if requestDTO.MongodbDatabase == nil {return errors.New("mongodb database configuration is required for restore")}- if tools.IsMongodbBackupVersionHigherThanRestoreVersion(+ isMongodbDowngrade, err := tools.IsMongodbBackupVersionHigherThanRestoreVersion(backupDatabase.Mongodb.Version,requestDTO.MongodbDatabase.Version,- ) {+ )+ if err != nil {+ return err+ }+ if isMongodbDowngrade {return errors.New(`backup database version is higher than restore database version. ` +`Should be restored to the same version as the backup database or higher. ` +`For example, you can restore MongoDB 6.0 backup to MongoDB 6.0, 7.0 or higher. But cannot restore to 5.0`)diff --git a/backend/internal/features/tests/logical/mongodb/backup_restore_test.go b/backend/internal/features/tests/logical/mongodb/backup_restore_test.goindex d73d5fdd..0df1a70e 100644--- a/backend/internal/features/tests/logical/mongodb/backup_restore_test.go+++ b/backend/internal/features/tests/logical/mongodb/backup_restore_test.go@@ -62,6 +62,7 @@ var mongodbVersions = []mongodbVersion{{"MongoDB 6.0", tools.MongodbVersion6, "mongo:6.0"},{"MongoDB 7.0", tools.MongodbVersion7, "mongo:7.0"},{"MongoDB 8.2", tools.MongodbVersion8, "mongo:8.2.3-noble"},+ {"MongoDB 9.0", tools.MongodbVersion9, "mongo:9.0.2-noble"},}// Test_MongodbBackupRestore_AcrossSupportedVersions boots each MongoDB version once, runs everydiff --git a/backend/internal/util/tools/common_test.go b/backend/internal/util/tools/common_test.goindex ecf783f7..153d21e6 100644--- a/backend/internal/util/tools/common_test.go+++ b/backend/internal/util/tools/common_test.go@@ -71,7 +71,7 @@ func Test_RunClients_WhenTheClientCannotStart_ReportsAFailure(t *testing.T) {func Test_RunClients_WithNoReleaseLineToHoldTheBundleTo_OnlyRequiresTheClientToStart(t *testing.T) {binDir := t.TempDir()- writeFakeClient(t, binDir, "mongodump", "mongodump version: 100.16.1")+ writeFakeClient(t, binDir, "mongodump", "mongodump version: 100.19.1")errs := runClients(binDir, []string{"mongodump"}, "", nil)if len(errs) != 0 {diff --git a/backend/internal/util/tools/mongodb.go b/backend/internal/util/tools/mongodb.goindex 8b5ad7bb..aee9fccc 100644--- a/backend/internal/util/tools/mongodb.go+++ b/backend/internal/util/tools/mongodb.go@@ -3,7 +3,6 @@ package toolsimport ("fmt""path/filepath"- "regexp")var mongodbRequired = []string{@@ -19,6 +18,7 @@ const (MongodbVersion6 MongodbVersion = "6"MongodbVersion7 MongodbVersion = "7"MongodbVersion8 MongodbVersion = "8"+ MongodbVersion9 MongodbVersion = "9")type MongodbExecutable string@@ -30,7 +30,7 @@ const (// GetMongodbExecutable returns the absolute path to a MongoDB Database Tools// binary. The tools are version-agnostic — a single client supports all-// supported server versions (4.2 – 8.x).+// supported server versions (4.2 – 9.x).func GetMongodbExecutable(executable MongodbExecutable) string {return filepath.Join(getMongodbBinDir(), string(executable))}@@ -60,39 +60,11 @@ func checkMongodb() []ToolCheckResult {// produced on backupVersion would be downgrade-restoring onto restoreVersion.func IsMongodbBackupVersionHigherThanRestoreVersion(backupVersion, restoreVersion MongodbVersion,-) bool {- versionOrder := map[MongodbVersion]int{- MongodbVersion4: 4,- MongodbVersion5: 5,- MongodbVersion6: 6,- MongodbVersion7: 7,- MongodbVersion8: 8,- }- return versionOrder[backupVersion] > versionOrder[restoreVersion]-}--// GetMongodbVersionEnum extracts the major version from a full version-// string (e.g. "8.2", "5.0.1") and returns the matching enum value.-func GetMongodbVersionEnum(version string) MongodbVersion {- re := regexp.MustCompile(`^(\d+)`)- matches := re.FindStringSubmatch(version)- if len(matches) < 2 {- panic(fmt.Sprintf("invalid mongodb version format: %s", version))+) (bool, error) {+ order, err := compareReleaseLines(string(backupVersion), string(restoreVersion))+ if err != nil {+ return false, fmt.Errorf("cannot order MongoDB versions: %w", err)}- major := matches[1]- switch major {- case "4":- return MongodbVersion4- case "5":- return MongodbVersion5- case "6":- return MongodbVersion6- case "7":- return MongodbVersion7- case "8":- return MongodbVersion8- default:- panic(fmt.Sprintf("unsupported mongodb major version: %s", major))- }+ return order > 0, nil}diff --git a/backend/internal/util/tools/mongodb_test.go b/backend/internal/util/tools/mongodb_test.gonew file mode 100644index 00000000..a7484f5b--- /dev/null+++ b/backend/internal/util/tools/mongodb_test.go@@ -0,0 +1,33 @@+package tools++import "testing"++func Test_IsMongodbBackupVersionHigherThanRestoreVersion_AcrossSupportedVersions_RefusesDowngrades(t *testing.T) {+ restoreCases := []struct {+ backup, restore MongodbVersion+ isDowngrade bool+ }{+ {MongodbVersion9, MongodbVersion8, true},+ {MongodbVersion8, MongodbVersion9, false},+ {MongodbVersion9, MongodbVersion9, false},+ {MongodbVersion4, MongodbVersion9, false},+ }++ for _, restoreCase := range restoreCases {+ isDowngrade, err := IsMongodbBackupVersionHigherThanRestoreVersion(restoreCase.backup, restoreCase.restore)+ if err != nil {+ t.Fatalf("ordering %s onto %s: %v", restoreCase.backup, restoreCase.restore, err)+ }++ if isDowngrade != restoreCase.isDowngrade {+ t.Errorf("restoring a %s backup onto %s: got %v, expected %v",+ restoreCase.backup, restoreCase.restore, isDowngrade, restoreCase.isDowngrade)+ }+ }+}++func Test_IsMongodbBackupVersionHigherThanRestoreVersion_WithAnIdentityItCannotRead_ReturnsError(t *testing.T) {+ if _, err := IsMongodbBackupVersionHigherThanRestoreVersion("", MongodbVersion9); err == nil {+ t.Error("an identity the guard cannot order must be an error, not a silent zero")+ }+}diff --git a/frontend/src/entity/databases/model/mongodb/MongodbVersion.ts b/frontend/src/entity/databases/model/mongodb/MongodbVersion.tsindex 9afafcfa..72d6a3ef 100644--- a/frontend/src/entity/databases/model/mongodb/MongodbVersion.ts+++ b/frontend/src/entity/databases/model/mongodb/MongodbVersion.ts@@ -1,8 +1,8 @@export enum MongodbVersion {- MongodbVersion42 = '4.2',- MongodbVersion44 = '4.4',- MongodbVersion50 = '5.0',- MongodbVersion60 = '6.0',- MongodbVersion70 = '7.0',- MongodbVersion80 = '8.0',+ MongodbVersion4 = '4',+ MongodbVersion5 = '5',+ MongodbVersion6 = '6',+ MongodbVersion7 = '7',+ MongodbVersion8 = '8',+ MongodbVersion9 = '9',}diff --git a/frontend/src/entity/databases/model/mongodb/disableSrvWhenTunneled.test.ts b/frontend/src/entity/databases/model/mongodb/disableSrvWhenTunneled.test.tsindex 839f156f..a263cd3f 100644--- a/frontend/src/entity/databases/model/mongodb/disableSrvWhenTunneled.test.ts+++ b/frontend/src/entity/databases/model/mongodb/disableSrvWhenTunneled.test.ts@@ -19,7 +19,7 @@ const enabledTunnel = (): SshTunnelConfig => ({const srvDatabase = (sshTunnel?: SshTunnelConfig): MongodbDatabase => ({id: 'db-1',- version: MongodbVersion.MongodbVersion70,+ version: MongodbVersion.MongodbVersion7,host: 'cluster0.example.mongodb.net',port: 27017,username: 'testuser',diff --git a/openspec/changes/support-mongodb-9/.openspec.yaml b/openspec/changes/archive/2026-10-10-support-mongodb-9/.openspec.yamlsimilarity index 100%rename from openspec/changes/support-mongodb-9/.openspec.yamlrename to openspec/changes/archive/2026-10-10-support-mongodb-9/.openspec.yamldiff --git a/openspec/changes/support-mongodb-9/design.md b/openspec/changes/archive/2026-10-10-support-mongodb-9/design.mdsimilarity index 100%rename from openspec/changes/support-mongodb-9/design.mdrename to openspec/changes/archive/2026-10-10-support-mongodb-9/design.mddiff --git a/openspec/changes/support-mongodb-9/proposal.md b/openspec/changes/archive/2026-10-10-support-mongodb-9/proposal.mdsimilarity index 100%rename from openspec/changes/support-mongodb-9/proposal.mdrename to openspec/changes/archive/2026-10-10-support-mongodb-9/proposal.mddiff --git a/openspec/changes/support-mongodb-9/specs/client-tool-bundles/spec.md b/openspec/changes/archive/2026-10-10-support-mongodb-9/specs/client-tool-bundles/spec.mdsimilarity index 100%rename from openspec/changes/support-mongodb-9/specs/client-tool-bundles/spec.mdrename to openspec/changes/archive/2026-10-10-support-mongodb-9/specs/client-tool-bundles/spec.mddiff --git a/openspec/changes/support-mongodb-9/specs/database-version-support/spec.md b/openspec/changes/archive/2026-10-10-support-mongodb-9/specs/database-version-support/spec.mdsimilarity index 100%rename from openspec/changes/support-mongodb-9/specs/database-version-support/spec.mdrename to openspec/changes/archive/2026-10-10-support-mongodb-9/specs/database-version-support/spec.mddiff --git a/openspec/changes/support-mongodb-9/tasks.md b/openspec/changes/archive/2026-10-10-support-mongodb-9/tasks.mdsimilarity index 83%rename from openspec/changes/support-mongodb-9/tasks.mdrename to openspec/changes/archive/2026-10-10-support-mongodb-9/tasks.mdindex 55c7523a..feeaac6c 100644--- a/openspec/changes/support-mongodb-9/tasks.md+++ b/openspec/changes/archive/2026-10-10-support-mongodb-9/tasks.md@@ -2,45 +2,45 @@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+- [x] 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)+- [x] 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+- [x] 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'`+- [x] 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`+- [x] 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+- [x] 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+- [x] 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:+- [x] 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/`+- [x] 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/`+- [x] 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/`+- [x] 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/`+- [x] 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/`+- [x] 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/`+- [x] 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/`+- [x] 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+- [x] 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`+- [x] 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/`+- [x] 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+- [x] 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`+- [x] 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+- [x] 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 remainsdiff --git a/openspec/specs/client-tool-bundles/spec.md b/openspec/specs/client-tool-bundles/spec.mdindex 218d51c5..4f3759d8 100644--- a/openspec/specs/client-tool-bundles/spec.md+++ b/openspec/specs/client-tool-bundles/spec.md@@ -8,7 +8,11 @@ Defines the database client programs that ship inside the product, what the syst### 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 and MariaDB version identity it accepts. 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 designated client MAY trail the server inside a single release line, and SHALL never come from a line older than the server's own.+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@@ -30,6 +34,11 @@ The system SHALL ship, for each processor architecture it runs on, a client desi- **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 line+### Requirement: Shipped clients stay on a maintained release lineThe system SHALL ship clients from a release line that the vendor still patches, or, when the line has reached its end of life, from the final patch that line received.@@ -90,3 +99,17 @@ The system SHALL treat a missing or unusable MySQL, MariaDB or MongoDB client as- **WHEN** a PostgreSQL client set is missing at startup- **THEN** the product reports the failure and exits++### 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 recordsdiff --git a/openspec/specs/database-version-support/spec.md b/openspec/specs/database-version-support/spec.mdindex b59a0a02..9522f48d 100644--- a/openspec/specs/database-version-support/spec.md+++ b/openspec/specs/database-version-support/spec.md@@ -2,7 +2,7 @@## Purpose-Defines which MySQL and MariaDB server versions Databasus accepts for backup, how the version it detects governs the tooling and the safety checks applied to that database, and how it behaves when it meets a server it ships no client for.+Defines which MySQL, MariaDB and MongoDB server versions Databasus accepts for backup, how the version it detects governs the tooling and the safety checks applied to that database, and how it behaves when it meets a server it ships no client for.## Requirements@@ -104,7 +104,7 @@ The system SHALL refuse a server it cannot serve and SHALL name what it found, s### 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 and MariaDB version it accepts, including versions added after the guard was written.+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@@ -116,6 +116,11 @@ The system SHALL refuse to restore a backup taken from a newer server onto an ol- **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@@ -138,3 +143,46 @@ The system SHALL display a version for every MySQL and MariaDB database it accep- **WHEN** an authorized user views a MySQL 26.x or MariaDB 13.x database- **THEN** the version field shows that version rather than an empty value++### 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 receiveddiff --git a/website/app/(en)/mongodb-backup/page.tsx b/website/app/(en)/mongodb-backup/page.tsxindex 86a37074..f4ba54d7 100644--- a/website/app/(en)/mongodb-backup/page.tsx+++ b/website/app/(en)/mongodb-backup/page.tsx@@ -84,7 +84,7 @@ export default function MongodbBackupPage() {"MongoDB connection health monitoring","Self-hosted via Docker","Open source and free",- "Support for MongoDB 4, 5, 6, 7 and 8",+ "Support for MongoDB 4, 5, 6, 7, 8 and 9","BSON archive compression with gzip","AES-256-GCM encryption for backup files","MongoDB Atlas and replica set support",@@ -130,7 +130,7 @@ export default function MongodbBackupPage() {name: "Which MongoDB versions does Databasus support?",acceptedAnswer: {"@type": "Answer",- text: "Databasus supports MongoDB versions 4, 5, 6, 7 and 8. All backups use the native mongodump tool with --archive and --gzip flags for efficient, compressed BSON archives that can be restored with mongorestore.",+ text: "Databasus supports MongoDB versions 4, 5, 6, 7, 8 and 9. All backups use the native mongodump tool with --archive and --gzip flags for efficient, compressed BSON archives that can be restored with mongorestore.",},},{@@ -544,7 +544,7 @@ export default function MongodbBackupPage() {</h3><p className="text-gray-400 text-sm md:text-base mb-4">- MongoDB 4, 5, 6, 7 and 8 are supported. Databasus uses the+ MongoDB 4, 5, 6, 7, 8 and 9 are supported. Databasus uses thenative mongodump tool for each version to ensure fullcompatibility with your document database</p>@@ -803,6 +803,9 @@ export default function MongodbBackupPage() {<span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">MongoDB 8</span>+ <span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">+ MongoDB 9+ </span></div></div></div>@@ -893,7 +896,7 @@ export default function MongodbBackupPage() {<FaqItemnumber="4"question="Which MongoDB versions does Databasus support?"- answer="Databasus supports MongoDB versions 4, 5, 6, 7 and 8. All backups use the native mongodump tool with --archive and --gzip flags for efficient, compressed BSON archives. The archives can be restored using mongorestore to any compatible MongoDB version, making migrations between versions straightforward."+ answer="Databasus supports MongoDB versions 4, 5, 6, 7, 8 and 9. All backups use the native mongodump tool with --archive and --gzip flags for efficient, compressed BSON archives. The archives can be restored using mongorestore to any compatible MongoDB version, making migrations between versions straightforward."/><FaqItemnumber="5"diff --git a/website/app/[lang]/mongodb-backup/content/es.tsx b/website/app/[lang]/mongodb-backup/content/es.tsxindex 45ab7246..4551a2a2 100644--- a/website/app/[lang]/mongodb-backup/content/es.tsx+++ b/website/app/[lang]/mongodb-backup/content/es.tsx@@ -84,7 +84,7 @@ export default function MongodbBackupPage() {"Monitorización del estado de la conexión a MongoDB","Autoalojado mediante Docker","De código abierto y gratuito",- "Soporte para MongoDB 4, 5, 6, 7 y 8",+ "Soporte para MongoDB 4, 5, 6, 7, 8 y 9","Compresión de archivos BSON con gzip","Cifrado AES-256-GCM de los archivos de respaldo","Soporte para MongoDB Atlas y replica sets",@@ -130,7 +130,7 @@ export default function MongodbBackupPage() {name: "¿Qué versiones de MongoDB soporta Databasus?",acceptedAnswer: {"@type": "Answer",- text: "Databasus soporta las versiones 4, 5, 6, 7 y 8 de MongoDB. Todos los respaldos usan la herramienta nativa mongodump con las opciones --archive y --gzip para obtener archivos BSON comprimidos y eficientes que pueden restaurarse con mongorestore.",+ text: "Databasus soporta las versiones 4, 5, 6, 7, 8 y 9 de MongoDB. Todos los respaldos usan la herramienta nativa mongodump con las opciones --archive y --gzip para obtener archivos BSON comprimidos y eficientes que pueden restaurarse con mongorestore.",},},{@@ -551,7 +551,7 @@ export default function MongodbBackupPage() {</h3><p className="text-gray-400 text-sm md:text-base mb-4">- Se soportan MongoDB 4, 5, 6, 7 y 8. Databasus usa la+ Se soportan MongoDB 4, 5, 6, 7, 8 y 9. Databasus usa laherramienta nativa mongodump para cada versión, lo quegarantiza compatibilidad total con su base de datos documental</p>@@ -818,6 +818,9 @@ export default function MongodbBackupPage() {<span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">MongoDB 8</span>+ <span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">+ MongoDB 9+ </span></div></div></div>@@ -908,7 +911,7 @@ export default function MongodbBackupPage() {<FaqItemnumber="4"question="¿Qué versiones de MongoDB soporta Databasus?"- answer="Databasus soporta las versiones 4, 5, 6, 7 y 8 de MongoDB. Todos los respaldos usan la herramienta nativa mongodump con las opciones --archive y --gzip para obtener archivos BSON comprimidos y eficientes. Los archivos pueden restaurarse con mongorestore en cualquier versión compatible de MongoDB, lo que simplifica las migraciones entre versiones."+ answer="Databasus soporta las versiones 4, 5, 6, 7, 8 y 9 de MongoDB. Todos los respaldos usan la herramienta nativa mongodump con las opciones --archive y --gzip para obtener archivos BSON comprimidos y eficientes. Los archivos pueden restaurarse con mongorestore en cualquier versión compatible de MongoDB, lo que simplifica las migraciones entre versiones."/><FaqItemnumber="5"diff --git a/website/app/[lang]/mongodb-backup/content/fr.tsx b/website/app/[lang]/mongodb-backup/content/fr.tsxindex b21db356..47a71677 100644--- a/website/app/[lang]/mongodb-backup/content/fr.tsx+++ b/website/app/[lang]/mongodb-backup/content/fr.tsx@@ -84,7 +84,7 @@ export default function MongodbBackupPage() {"Supervision de l'état des connexions MongoDB","Auto-hébergé via Docker","Open source et gratuit",- "Prise en charge de MongoDB 4, 5, 6, 7 et 8",+ "Prise en charge de MongoDB 4, 5, 6, 7, 8 et 9","Compression gzip des archives BSON","Chiffrement AES-256-GCM des fichiers de backup","Prise en charge de MongoDB Atlas et des replica sets",@@ -130,7 +130,7 @@ export default function MongodbBackupPage() {name: "Quelles versions de MongoDB Databasus prend-il en charge ?",acceptedAnswer: {"@type": "Answer",- text: "Databasus prend en charge les versions 4, 5, 6, 7 et 8 de MongoDB. Tous les backups utilisent l'outil natif mongodump avec les options --archive et --gzip pour produire des archives BSON compressées et efficaces, restaurables avec mongorestore.",+ text: "Databasus prend en charge les versions 4, 5, 6, 7, 8 et 9 de MongoDB. Tous les backups utilisent l'outil natif mongodump avec les options --archive et --gzip pour produire des archives BSON compressées et efficaces, restaurables avec mongorestore.",},},{@@ -551,7 +551,7 @@ export default function MongodbBackupPage() {</h3><p className="text-gray-400 text-sm md:text-base mb-4">- MongoDB 4, 5, 6, 7 et 8 sont pris en charge. Databasus utilise+ MongoDB 4, 5, 6, 7, 8 et 9 sont pris en charge. Databasus utilisel'outil natif mongodump pour chaque version afin degarantir une compatibilité totale avec votre base documentaire</p>@@ -818,6 +818,9 @@ export default function MongodbBackupPage() {<span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">MongoDB 8</span>+ <span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">+ MongoDB 9+ </span></div></div></div>@@ -908,7 +911,7 @@ export default function MongodbBackupPage() {<FaqItemnumber="4"question="Quelles versions de MongoDB Databasus prend-il en charge ?"- answer="Databasus prend en charge les versions 4, 5, 6, 7 et 8 de MongoDB. Tous les backups utilisent l'outil natif mongodump avec les options --archive et --gzip pour produire des archives BSON compressées et efficaces. Les archives peuvent être restaurées avec mongorestore vers toute version MongoDB compatible, ce qui simplifie les migrations entre versions."+ answer="Databasus prend en charge les versions 4, 5, 6, 7, 8 et 9 de MongoDB. Tous les backups utilisent l'outil natif mongodump avec les options --archive et --gzip pour produire des archives BSON compressées et efficaces. Les archives peuvent être restaurées avec mongorestore vers toute version MongoDB compatible, ce qui simplifie les migrations entre versions."/><FaqItemnumber="5"diff --git a/website/app/[lang]/mongodb-backup/content/pt.tsx b/website/app/[lang]/mongodb-backup/content/pt.tsxindex 265d2c05..e9e281d1 100644--- a/website/app/[lang]/mongodb-backup/content/pt.tsx+++ b/website/app/[lang]/mongodb-backup/content/pt.tsx@@ -84,7 +84,7 @@ export default function MongodbBackupPage() {"Monitoramento de saúde da conexão MongoDB","Auto-hospedado via Docker","Open source e gratuito",- "Suporte a MongoDB 4, 5, 6, 7 e 8",+ "Suporte a MongoDB 4, 5, 6, 7, 8 e 9","Compressão de arquivos BSON com gzip","Criptografia AES-256-GCM para arquivos de backup","Suporte a MongoDB Atlas e replica sets",@@ -130,7 +130,7 @@ export default function MongodbBackupPage() {name: "Quais versões de MongoDB o Databasus suporta?",acceptedAnswer: {"@type": "Answer",- text: "O Databasus suporta as versões 4, 5, 6, 7 e 8 do MongoDB. Todos os backups usam a ferramenta nativa mongodump com as flags --archive e --gzip, gerando arquivos BSON compactos e eficientes que podem ser restaurados com o mongorestore.",+ text: "O Databasus suporta as versões 4, 5, 6, 7, 8 e 9 do MongoDB. Todos os backups usam a ferramenta nativa mongodump com as flags --archive e --gzip, gerando arquivos BSON compactos e eficientes que podem ser restaurados com o mongorestore.",},},{@@ -552,7 +552,7 @@ export default function MongodbBackupPage() {</h3><p className="text-gray-400 text-sm md:text-base mb-4">- MongoDB 4, 5, 6, 7 e 8 são suportados. O Databasus usa a+ MongoDB 4, 5, 6, 7, 8 e 9 são suportados. O Databasus usa aferramenta nativa mongodump para cada versão, garantindocompatibilidade total com a sua base de dados de documentos</p>@@ -817,6 +817,9 @@ export default function MongodbBackupPage() {<span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">MongoDB 8</span>+ <span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">+ MongoDB 9+ </span></div></div></div>@@ -907,7 +910,7 @@ export default function MongodbBackupPage() {<FaqItemnumber="4"question="Quais versões de MongoDB o Databasus suporta?"- answer="O Databasus suporta as versões 4, 5, 6, 7 e 8 do MongoDB. Todos os backups usam a ferramenta nativa mongodump com as flags --archive e --gzip, gerando arquivos BSON compactos e eficientes. Os arquivos podem ser restaurados com o mongorestore em qualquer versão compatível do MongoDB, o que simplifica migrações entre versões."+ answer="O Databasus suporta as versões 4, 5, 6, 7, 8 e 9 do MongoDB. Todos os backups usam a ferramenta nativa mongodump com as flags --archive e --gzip, gerando arquivos BSON compactos e eficientes. Os arquivos podem ser restaurados com o mongorestore em qualquer versão compatível do MongoDB, o que simplifica migrações entre versões."/><FaqItemnumber="5"diff --git a/website/app/[lang]/mongodb-backup/content/ru.tsx b/website/app/[lang]/mongodb-backup/content/ru.tsxindex 0d25c9ca..dc37c76d 100644--- a/website/app/[lang]/mongodb-backup/content/ru.tsx+++ b/website/app/[lang]/mongodb-backup/content/ru.tsx@@ -84,7 +84,7 @@ export default function MongodbBackupPage() {"Мониторинг доступности подключения к MongoDB","Self-hosted установка через Docker","Открытый исходный код, бесплатно",- "Поддержка MongoDB 4, 5, 6, 7 и 8",+ "Поддержка MongoDB 4, 5, 6, 7, 8 и 9","Сжатие BSON-архивов через gzip","Шифрование файлов бекапов AES-256-GCM","Поддержка MongoDB Atlas и replica set",@@ -130,7 +130,7 @@ export default function MongodbBackupPage() {name: "Какие версии MongoDB поддерживает Databasus?",acceptedAnswer: {"@type": "Answer",- text: "Databasus поддерживает MongoDB версий 4, 5, 6, 7 и 8. Все бекапы делаются родным инструментом mongodump с флагами --archive и --gzip: получаются компактные сжатые BSON-архивы, которые восстанавливаются через mongorestore.",+ text: "Databasus поддерживает MongoDB версий 4, 5, 6, 7, 8 и 9. Все бекапы делаются родным инструментом mongodump с флагами --archive и --gzip: получаются компактные сжатые BSON-архивы, которые восстанавливаются через mongorestore.",},},{@@ -548,7 +548,7 @@ export default function MongodbBackupPage() {</h3><p className="text-gray-400 text-sm md:text-base mb-4">- Поддерживаются MongoDB 4, 5, 6, 7 и 8. Для каждой версии+ Поддерживаются MongoDB 4, 5, 6, 7, 8 и 9. Для каждой версииDatabasus использует родной mongodump — это дает полнуюсовместимость с вашей документной базой</p>@@ -809,6 +809,9 @@ export default function MongodbBackupPage() {<span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">MongoDB 8</span>+ <span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">+ MongoDB 9+ </span></div></div></div>@@ -899,7 +902,7 @@ export default function MongodbBackupPage() {<FaqItemnumber="4"question="Какие версии MongoDB поддерживает Databasus?"- answer="Databasus поддерживает MongoDB версий 4, 5, 6, 7 и 8. Все бекапы делаются родным инструментом mongodump с флагами --archive и --gzip: получаются компактные сжатые BSON-архивы. Их можно восстановить через mongorestore на любую совместимую версию MongoDB, что упрощает миграции между версиями."+ answer="Databasus поддерживает MongoDB версий 4, 5, 6, 7, 8 и 9. Все бекапы делаются родным инструментом mongodump с флагами --archive и --gzip: получаются компактные сжатые BSON-архивы. Их можно восстановить через mongorestore на любую совместимую версию MongoDB, что упрощает миграции между версиями."/><FaqItemnumber="5"diff --git a/website/app/[lang]/mongodb-backup/content/zh.tsx b/website/app/[lang]/mongodb-backup/content/zh.tsxindex 614e2ddd..d45bb0c0 100644--- a/website/app/[lang]/mongodb-backup/content/zh.tsx+++ b/website/app/[lang]/mongodb-backup/content/zh.tsx@@ -84,7 +84,7 @@ export default function MongodbBackupPage() {"MongoDB 连接健康监控","通过 Docker 自托管","开源且免费",- "支持 MongoDB 4、5、6、7 和 8",+ "支持 MongoDB 4、5、6、7、8 和 9","使用 gzip 压缩 BSON 归档","备份文件 AES-256-GCM 加密","支持 MongoDB Atlas 和副本集",@@ -130,7 +130,7 @@ export default function MongodbBackupPage() {name: "Databasus 支持哪些 MongoDB 版本?",acceptedAnswer: {"@type": "Answer",- text: "Databasus 支持 MongoDB 4、5、6、7 和 8。所有备份都使用原生 mongodump 工具并带 --archive 和 --gzip 参数,生成高效压缩的 BSON 归档,可用 mongorestore 恢复。",+ text: "Databasus 支持 MongoDB 4、5、6、7、8 和 9。所有备份都使用原生 mongodump 工具并带 --archive 和 --gzip 参数,生成高效压缩的 BSON 归档,可用 mongorestore 恢复。",},},{@@ -541,7 +541,7 @@ export default function MongodbBackupPage() {</h3><p className="text-gray-400 text-sm md:text-base mb-4">- 支持 MongoDB 4、5、6、7 和 8。Databasus 为每个版本使用原生+ 支持 MongoDB 4、5、6、7、8 和 9。Databasus 为每个版本使用原生mongodump 工具,确保与你的文档数据库完全兼容</p>@@ -792,6 +792,9 @@ export default function MongodbBackupPage() {<span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">MongoDB 8</span>+ <span className="px-3 py-1 rounded border border-[#ffffff20] text-sm">+ MongoDB 9+ </span></div></div></div>@@ -880,7 +883,7 @@ export default function MongodbBackupPage() {<FaqItemnumber="4"question="Databasus 支持哪些 MongoDB 版本?"- answer="Databasus 支持 MongoDB 4、5、6、7 和 8。所有备份都使用原生 mongodump 工具并带 --archive 和 --gzip 参数,生成高效压缩的 BSON 归档。归档可以用 mongorestore 恢复到任何兼容的 MongoDB 版本,版本间迁移也因此变得简单。"+ answer="Databasus 支持 MongoDB 4、5、6、7、8 和 9。所有备份都使用原生 mongodump 工具并带 --archive 和 --gzip 参数,生成高效压缩的 BSON 归档。归档可以用 mongorestore 恢复到任何兼容的 MongoDB 版本,版本间迁移也因此变得简单。"/><FaqItemnumber="5"diff --git a/website/public/llms.txt b/website/public/llms.txtindex 523b51ff..96fbbaba 100644--- a/website/public/llms.txt+++ b/website/public/llms.txt@@ -86,7 +86,7 @@ Physical, full, incremental and WAL backups are built on PostgreSQL 17's native### Database Guides- [MySQL and MariaDB Backup](https://databasus.com/mysql-backup): Comprehensive guide on using Databasus for MySQL and MariaDB backups. Explains how to backup MySQL databases using mysqldump under the hood, with support for MySQL 5.7, 8.0, 8.4 and 9, as well as MariaDB 10, 11 and 12 using native mariadb-dump tool. Includes details on scheduled backups, cloud storage integration, notifications, compression, encryption and compatibility with cloud-hosted MySQL services like AWS RDS, Google Cloud SQL, Azure Database for MySQL and PlanetScale.-- [MongoDB Backup](https://databasus.com/mongodb-backup): Complete guide on using Databasus for MongoDB backups. Explains how to backup MongoDB databases using mongodump under the hood, with support for MongoDB versions 4, 5, 6, 7 and 8. Includes information about scheduled backups, BSON archive storage, cloud storage integration, notifications, compression with gzip, AES-256-GCM encryption and compatibility with MongoDB Atlas, replica sets and self-hosted deployments.+- [MongoDB Backup](https://databasus.com/mongodb-backup): Complete guide on using Databasus for MongoDB backups. Explains how to backup MongoDB databases using mongodump under the hood, with support for MongoDB versions 4, 5, 6, 7, 8 and 9. Includes information about scheduled backups, BSON archive storage, cloud storage integration, notifications, compression with gzip, AES-256-GCM encryption and compatibility with MongoDB Atlas, replica sets and self-hosted deployments.### Restore and Recovery