MongoDB and Git had a baby, and it's named Dumbo. It's a document database with built-in version control, so you can track changes, branch, and merge just like you would with code -- but for your data.
DumboDB leverages the power of the Dolt storage engine. Dolt's prolly trees enable efficient storage of data over time thanks to structural sharing between commits. This means you can have a rich history of changes without worrying about storage bloat.
DumboDB is pre-1.0 software and not yet ready for production use -- come chat with us on our Discord server, where the developers hang out all day.
The fastest way to try DumboDB is with Docker. This starts the server on port 27017 and persists your data to a dumbodb-data directory in your current working directory so it survives container restarts:
docker run -p 27017:27017 -v $(pwd)/dumbodb-data:/var/lib/dumbodb dolthub/dumbodb:latestThen connect with mongosh shell, or any MongoDB driver:
mongosh mongodb://localhost:27017This connects you to the test database by default. You can specify a different database in the connection string if you like (e.g. mongodb://localhost:27017/mydb).
To pass flags (e.g. enable auto-commit or change the log level), append them after the image name. See the Docker image guide for the full set of options.
git clone https://github.com/dolthub/dumbodb
cd dumbodb
make build # Binary ends up here: .runtime/bin/dumbodb
cp .runtime/bin/dumbodb /usr/local/bin # or somewhere else in your $PATHWe publish pre-built binaries for Linux, MacOS, and Windows on our GitHub Releases page. Download the appropriate binary for your platform, put it somewhere in your PATH. The specifics will depend on your operating system, as they have protections against running arbitrary binaries from the internet, so please refer to your OS documentation for how to run downloaded binaries. We are working on getting signed binaries published to make this easier!
When running the binary directly, the required argument is --data-dir, which specifies the directory where your data will be stored. The directory must already exist; as with mongod, DumboDB refuses to start rather than create it.
$ mkdir -p /tmp/dumbodb-data
$ dumbodb --data-dir /tmp/dumbodb-dataDumboDB implements the MongoDB 8.0 wire protocol and is designed for high parity with core MongoDB operations. It functions as a drop-in replacement for standard drivers and mongosh in single-node environments.
Parity is verified against a specific MongoDB release: MongoDB 8.0.28. This is the version DumboDB advertises (e.g. via buildInfo) and the version the parity test suite runs against in CI. We bump this to a newer 8.0.x periodically.
- BSON Engine: Full support for BSON type fidelity, including nested documents, arrays, and ObjectIDs.
- Query & Update: Supports complex MQL operators (e.g., $elemMatch, $all, $rename) and atomic array modifiers ($push, $pull, $bit).
- Aggregation Framework: Implementation of multi-stage pipelines including $match, $group, $unwind, and $lookup.
- Indexing: Support for secondary indexes on top-level and nested fields to ensure query performance.
- Transactions: Multi-document transactions (
startTransaction/commitTransaction/abortTransaction) are supported in the default operating mode. - Validation: Document validators (
$jsonSchemaand query-expression validators) are enforced on all write paths, honorbypassDocumentValidation, and are carried through branch merges. - Authentication & Access Control: SCRAM authentication with role-based access control (RBAC), including built-in and custom roles, privilege grant/revoke, and role inheritance. As in MongoDB, access control is enabled with
--auth; the first user is bootstrapped via the localhost exception (create a user with therootrole from a local connection), after which all connections must authenticate. X.509 client certificate authentication is also supported: create the user in$externalnamed by its certificate's RFC 2253 subject, then connect with--authenticationMechanism MONGODB-X509and no password. - TLS:
--tlsModesupportsdisabled,allowTLS,preferTLS, andrequireTLS. For inbound connections,allowTLSandpreferTLSaccept plaintext and TLS on the same port, whilerequireTLSrejects plaintext. The--tlsCertificateKeyFile,--tlsCertificateKeyFilePassword,--tlsCAFile,--tlsCRLFile,--tlsDisabledProtocols, and--tlsAllowConnectionsWithoutCertificatesoptions are supported. Encrypted PKCS#8 private keys are accepted; legacy encrypted PEM keys are rejected with conversion guidance. As in MongoDB 8.0, TLS requires a chain of trust, so--tlsCAFileis mandatory and client certificates are then verified unless you pass--tlsAllowConnectionsWithoutCertificates. Certificate material is validated when the server starts rather than on the first connection. Unsupported--tls*options mongod accepts are rejected at startup with a message naming the option, so a setting DumboDB does not implement is never silently ignored.
- Replica Sets: DumboDB can join a MongoDB replica set as a non-voting peer. General replica-set functionality and sharding remain out of scope. An authenticated replica set uses
--auth --keyFile <path>. WithpreferTLSorrequireTLS, replication uses TLS;--tlsClusterFile,--tlsClusterPassword, and--tlsClusterCAFilemay override the general certificate settings for member connections. X.509 cluster authentication is not supported. - Ecosystem Features: Proprietary features specific to MongoDB Atlas (e.g., Search Indexes, Serverless Triggers) are not supported. Support not planned.
- Capped Collections: Fixed-size collections (
capped: true) and their oldest-first eviction are not supported; creating one is rejected with an error. Not clear if there is any place for this feature in a version-controlled database. Support not planned. - Expiration (TTL):
expireAfterSecondsis not supported; specifying it on a collection or index is rejected with an error rather than silently accepted. Support not planned. - Clustered Collections: every collection is stored clustered by
_id, as a MongoDB collection created withclusteredIndex: {key: {_id: 1}, unique: true}is, andlistCollectionsandlistIndexesreport it that way. TheclusteredIndexoption is validated as in MongoDB and otherwise has no effect. Behavior that follows from clustering:- A query without a sort, and
$naturalorder, return documents in_idorder rather than insertion order. With the default ObjectId_ids that is close to insertion order. _idequality, ranges and sorts read the collection directly (CLUSTERED_IXSCANin explain).- Secondary index entries carry the encoded
_id, so large_ids (long strings, embedded documents) make secondary indexes larger. mongodumpof a DumboDB database restored into MongoDB creates clustered collections.
- A query without a sort, and
- Key Size: an encoded key may be at most 1024 bytes: an
_id, or an index entry (its indexed values plus the_id). A longer key is refused with aKeyTooLong(17280) error. MongoDB accepts much larger keys (up to 8MB for a clustered_id). The limit applies to the encoded size, which can exceed the value's own size:- Strings carry a terminator, and each NUL byte inside one takes two bytes, so a 1023-character ASCII
_idencodes to 1025 bytes. - An index with a collation stores each string's collation sort key, which can be longer than the string; at strength 3, each 'e-acute' character (2 bytes of UTF-8) takes about 3 bytes of key.
- A hashed index stores the value itself rather than a 64-bit hash, so a long string on a hashed field is subject to the limit.
- A text index stores each word, so a single word longer than the limit is refused.
- When replicating from MongoDB, a source document with a longer key stops replication with a
key_too_longfailure that names its namespace. - A data directory written by a version with a different limit (earlier versions allowed 4096 bytes) is refused at startup or on first use; recreate it.
- Strings carry a terminator, and each NUL byte inside one takes two bytes, so a 1023-character ASCII
- Query Plans: when an
$oruses several indexes, DumboDB runs their scans in index name order; MongoDB uses index creation order, which DumboDB does not record. Results are the same; only the order of unsorted results and explain output differ. - Geo points stored as documents: MongoDB reads a legacy point stored as an embedded document from its first two fields, x then y, whatever their names (
{lng: 10, lat: 1}is (10, 1), and{lat: 1, lng: 10}is (1, 10)). DumboDB stores every document with sorted keys, which loses that order, so it does not treat a stored embedded document as a point:$near,$geoWithinand geo indexes skip it. Store points as[x, y]arrays or GeoJSON, which work as in MongoDB. - RecordIds:
showRecordId()and$recordIdreturn MongoDB's KeyString bytes for the_id, except for a Decimal128_idbelow 2^-255 that is not exactly a double, whose last bytes can differ (see mongodb-keystring.md). Order and uniqueness are unaffected. - Reserved System Databases: the
configandlocaldatabases carry special MongoDB semantics that DumboDB does not implement, so creating them is rejected with an error. DumboDB uses theadmindatabase to store users and roles, but it is not at full parity with MongoDB'sadmindatabase.
If you are needing missing features, please file an issue, or join our Discord server to start a conversation with us. We'd love your feedback!
DumboDB's version control features are exposed via a set of custom commands (e.g. dumboCommit, dumboMerge, etc.) that you can run from any MongoDB client. These commands allow you to commit changes, create branches, merge branches, view commit history, and more.
| Command | Description |
|---|---|
dumboCommit |
Commit the current working set with a message and author |
dumboBranch |
Create or delete a branch |
dumboBranchStatus |
Report how many commits each target refspec is ahead and behind a base refspec |
dumboMerge |
Merge a source branch into the current branch |
dumboCherryPick |
Apply one commit's diff onto the current branch |
dumboRebase |
Reapply branch commits onto another branch tip, rewriting history |
dumboLog |
Return commit history for the current branch |
dumboStatus |
Show summary of uncommitted changes on the current branch |
dumboDiff |
Document-level diff between two states |
dumboReset |
Move branch HEAD to a target commit (soft or hard) |
dumboRevert |
Revert a commit, creating a new inverse commit |
dumboConflicts |
List or inspect conflicts from an in-progress merge/cherry-pick/rebase |
dumboResolveConflict |
Resolve a single document conflict (ours / theirs / custom) |
dumboTag |
Create, list, or delete tags at specific commits |
dumboGC |
Run garbage collection on the database's chunk store |
dumboUndrop |
Restore a soft-deleted database, or list databases available to undrop |
dumboRemote |
Add, list, or remove a named remote |
dumboClone |
Create a new database by cloning a remote |
dumboPush |
Push a commit to a branch on a remote |
dumboFetch |
Download every branch from a remote into tracking refs |
dumboPull |
Fetch from a remote and merge into the current branch |
dumboBackup |
Back up a database to a URL, or restore one from it |
All commands have a dolt* alias (e.g. doltCommit, doltMerge). Use whichever prefix you prefer!
Full command reference: Command Reference
All examples below are using the mongosh shell, which is effectively JavaScript. There are equivalent operations for any MongoDB driver in your favorite language.
By default, all connections target the main branch. This is currently hard coded. Using the getSiblingDB() method, you can connect to a different branch by encoding the branch name in the database name. @ is the delimiter between the database name and the branch name. For example, to connect to a branch named mybranch, you would connect to the database mydb@mybranch:
var db = db.getSiblingDB("mydb@mybranch")If you specify a revision rather than a branch name, then the database returned will be read-only and reflect the state of the database at that revision. For example, if you'd like to perform reads against the parent commit of the main branch, you can connect to mydb@main~1:
var db = db.getSiblingDB("mydb@main~1")Alternatively you can use a commit hash to create a read-only connection to that commit:
var db = db.getSiblingDB("mydb@v9ra3pmi0f6kotj5k3fganpmb3oi9t1k")Say you want to stick two documents into the "items" collection, then commit them:
var db = db.getSiblingDB("mydb@main")
db.items.insertOne({ _id: 1, label: "alpha", score: 10 })
db.items.insertOne({ _id: 2, label: "beta", score: 20 })
db.runCommand({ dumboCommit: 1, message: "baseline", author: "alice <alice@acme.com>" })The last command creates a new commit with the two inserted documents, and outputs the commit details:
{
commitId: 'egqis00l0vqg5kd7gbje8k1k6g7dl7ja',
branch: 'main',
message: 'baseline',
author: 'alice <alice@acme.com>',
timestamp: ISODate('2026-04-28T23:12:23.621Z'),
committer: 'alice <alice@acme.com>',
committerTimestamp: ISODate('2026-04-28T23:12:23.621Z'),
ok: 1
}Note that there is no need to add items like you would with git add. DumboDB tracks all changes in the working set, and they will all be included in the next commit unless you explicitly discard them.
Now let's modify those documents, and add a new one, but don't commit just yet:
db.items.insertOne({ _id: 3, label: "gamma", score: 30 })
db.items.updateOne({ _id: 1 }, { $set: { score: 99 } })
db.items.deleteOne({ _id: 2 })At this point, if we run dumboStatus, we can see a summary of the uncommitted changes:
db.runCommand({dumboStatus: 1})Will output the summary of your changes. Specifically, it shows that in the 'items' collection, you have 1 added document, 1 modified document, and 1 removed document:
{
branch: 'main',
dirty: true,
readonly: false,
changes: [
{
type: 'collection',
name: 'items',
status: 'modified',
documents: { added: 1, modified: 1, removed: 1 },
indexes: { added: [], removed: [], modified: [] },
metadata: {}
}
],
ok: 1
}If you need more detail, you can run dumboDiff. When called with no additional arguments, it will print all of the changes in your session. Specifically everything that is not committed. These are the changes that will be committed when you run dumboCommit.
db.runCommand({ dumboDiff: 1 })Will produce:
{
collections: [
{
name: 'items',
status: 'modified',
added: [ { _id: 3, label: 'gamma', score: 30 } ],
removed: [ { _id: 2, label: 'beta', score: 20 } ],
modified: [
{
_id: 1,
diff: [ { type: 'modified', path: '$.score', from: 10, to: 99 } ]
}
]
}
],
ok: 1
}You can specify the from and to arguments to dumboDiff to see the changes between any two commits. For example, if you want to see the changes between the current state of your session and the last commit, you can run:
db.runCommand({ dumboDiff: 1, from: "HEAD~1", to: "HEAD" })The dumboLog command will show you the commit history for the current branch, starting with the most recent commit.
db.runCommand({ dumboLog: 1, limit: 2 })
{
commits: [
{
commitId: 'v9ra3pmi0f6kotj5k3fganpmb3oi9t1k',
parent1: 'tqq1tn5qs0pns2j2uk5k1b2ufhqt9q3b',
refs: [ 'HEAD', 'main' ],
message: 'alice order updated',
timestamp: ISODate('2026-04-14T17:22:31.000Z'),
author: 'alice <alice@acme.com>'
},
{
commitId: 'tqq1tn5qs0pns2j2uk5k1b2ufhqt9q3b',
parent1: '5vi6e5t3riqpgh6fq0j1pf0r0imuqhsn',
message: 'initial data',
timestamp: ISODate('2026-04-14T09:00:00.000Z'),
author: 'bob <bob@acme.com>'
},
],
ok: 1
}You can create a new branch with dumboBranch. In this example, you can see that a new variable feature is created to represent the new branch, and you can run commands against it directly:
// Create the branch
db.runCommand({ dumboBranch: 1, branch: "feature" })
// "checkout"
var feature = db.getSiblingDB("mydb@feature")
feature.items.insertOne({ _id: 4, label: "delta", score: 40 })
feature.runCommand({ dumboCommit: 1, message: "add delta on feature branch", author: "alice <alice@acme.com>" })The dumboMerge command will merge the changes from the feature branch back into whatever branch you are on. db is still connected to main, so when we run the merge command, it will merge feature into main, which in this case is a fast-forward merge, since main has not diverged from feature. The output of the merge command will show you the new commit that was created on main as a result of the merge.
db.runCommand({ dumboMerge: 1, mergeIn: "feature"})
{
commitId: 'gr2iofosqge0se1dcu2b1a1u42l6udd3',
message: 'fast-forward',
ok: 1
}There are also legitimate merges which join two commit histories, complete with conflict detection and resolution. Look at the Command Reference for more details and examples.
By default, a running DumboDB server reports anonymous usage metrics to DoltHub when it starts and once a day while it runs. This is a heartbeat that lets us count how many servers are running; it contains only an anonymous per-machine id, the DumboDB version, the OS platform, and the event type. It never includes your data, database or collection names, queries, or any personally identifying information. The server logs whether metrics are enabled at startup.
To disable metrics, use either the --no-metrics flag or the DUMBODB_NO_METRICS=1 environment variable (equivalent):
# binary
$ dumbodb --data-dir /tmp/dumbodb-data --no-metrics
# Docker (append the flag after the image name, or set the env var)
$ docker run -p 27017:27017 dolthub/dumbodb:latest --no-metrics
$ docker run -p 27017:27017 -e DUMBODB_NO_METRICS=1 dolthub/dumbodb:latestDumboDB is built on two open-source projects:
- FerretDB -- The wire protocol, connection handling, type system, and handler packages were adapted from FerretDB v1.24.2 (Apache 2.0). See ACKNOWLEDGEMENTS for details.
- Dolt -- The version-controlled storage engine powering every commit, branch, and merge.
Before calling DumboDB beta, we need:
- Mongo Query Parity
- Branch Permissions
- Signed Executables
- Auto-GC
- Commit Signing / Tag Signing
After beta, v1.0 will be the general availability release, with a focus on stability, performance, and usability improvements.