Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

MongoDB: limits and operations

What the MongoDB adapter of Exponential cannot do yet, how to find untranslated SQL in the logs, how upgrades work without SQL update files, backups with mongodump, the migration scripts in bin/mongodb, and what to…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/database-administrators/mongodb-limits-and-operations.md

On this page

MongoDB: limits and operations

This page is for database administrators who decide whether MongoDB fits a site, or who already run one. It answers: what the adapter does not support, how to recognize a feature that silently returns nothing, how upgrades and schema checks work without SQL, how to back up, and how a MySQL site is moved to MongoDB. Sources: MongoDB as the database, 9.5 MongoDB and section 26 of the porting reference.

Contents

  1. How the adapter works
  2. Known limits
  3. Finding untranslated SQL
  4. Upgrades without SQL files
  5. Backups
  6. Moving a MySQL site to MongoDB
  7. Performance
  8. Checklist

How the adapter works

expMongoDB never runs real SQL. It parses the kernel's SQL-shaped calls and turns them into find, aggregate, insert, upsert and delete operations on collections named like the kernel's tables (ezcontentobject, ezcontentobject_tree and so on). Its schema handler is expMongoSchema (settings/dbschema.ini, type mongo). eZDB::instance()->databaseName() returns mongo.

Known limits

  • Hand-written SQL that the adapter cannot translate returns an empty result and logs a warning. Extensions with SQL of their own may need a MongoDB path. An empty result is not an answer: code that decides access with its own SQL must read it as "no", never as "nothing restricts this". Check the log for untranslated SQL (below) before a site goes into production.
  • Deep URL alias regeneration after moving subtrees is incomplete.
  • Role and policy list pages can be empty although permissions are enforced.
  • Some cronjobs are not ported.
  • eztags is not usable.
  • The shop checkout and ezflow scheduling are untested end to end.
  • The SQL query cache does not apply.
  • There are no SQL update files.
  • Errors: errorNumber() reports MongoDB's codes (11000 for a duplicate key); the driver answers false and throws nothing (Database error codes and messages).

Test every extension and every workflow your site uses on a staging copy before you go live.

Finding untranslated SQL

Search the logs for the marker the adapter writes:

grep -rn "MONGO TODO" var/log/ | tail -20

Each hit names a statement that returned an empty result instead of data. A page that shows "nothing found" where other engines show content usually has a hit here. Report kernel statements on the software tracker; fix your own extensions' SQL (Reviewing extension SQL for every engine).

Upgrades without SQL files

MongoDB has no update/database/ directory. What replaces it:

  • Setup > Upgrade check, "Check database consistency", compares collections instead of tables: missing collections grouped by feature, collections not in the schema, and the mongosh commands that create the missing ones (The upgrade check).
  • php update/common/scripts/6.0/createaudittables.php creates the audit index collections of 6.0.15 through the schema handler (--dry-run first).
  • The trash documents get trashed_by and trashed_via when written; older ones read as their defaults, so movetrashrecords.php runs as on the other engines.
  • Run bin/mongodb/create_indexes.js again after an upgrade.

See 11.3 The update files.

Backups

mongodump --uri="mongodb://exponential@localhost:27017/exponential" --out=/backup/$(date +%F)
mongorestore --uri="mongodb://exponential@localhost:27017/exponential" --drop /backup/2026-10-05

The tools ask for the password when the URI has none. Replica sets, oplog-based point-in-time backups and snapshots are MongoDB's own features and work as with any client. Back up var/storage and settings/override with the database (Backups per engine).

Moving a MySQL site to MongoDB

The scripts in bin/mongodb/ move an existing MySQL site:

ScriptRole
export_mysql.shdumps every Exponential table from MySQL to NDJSON (the password comes from MYSQL_PASSWORD)
mysql2ndjson.pythe converter export_mysql.sh calls
fixup_ndjson.pypost-processes the files: integer _ids, NULL strings dropped, known integer fields cast
validate_ndjson.shchecks that each file is valid JSON, one object per line; exit 1 on errors
import_all.shimports the files into MongoDB in dependency order

The procedure is section 18 of the porting reference. Plan a maintenance window, then create the indexes and run the cronjobs (Moving a site to another engine).

Performance

Performance follows the number of statements per page, because each kernel call becomes one or more MongoDB operations. The indexes from create_indexes.js are the first lever; the caches in front of the database are the second (Performance and scaling).

Checklist

  • To do: Every extension and workflow tested on staging; no MONGO TODO in the logs after a full click-through.
  • To do: eztags, shop checkout and ezflow not needed, or tested.
  • To do: Indexes created after install and after each upgrade.
  • To do: Upgrade check run after each upgrade; missing collections created.
  • To do: mongodump backups scheduled and a restore tested.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x