移行

MongoDB から FerretDB への移行

ライセンスと利用条件

MongoDB
Other, ソースアベイラブル
FerretDB
Apache-2.0, オープンソース
置き換えの度合い
ドロップイン Speaks the MongoDB wire protocol on top of PostgreSQL.

このページは英語で書かれています。

Compatibility

FerretDB states that all drivers and applications compatible with MongoDB 5.0 and later should work with it over the wire protocol. It keeps MongoDB’s error names and codes. Two differences are permanent: error messages can differ, and collection names must be valid UTF-8, where MongoDB accepts invalid sequences. The project treats any other difference as a bug.

The compatibility page lists the commands that are not implemented yet. Among them:

Before you switch

  1. Test the application against FerretDB first. Start FerretDB with --mode=diff-normal, point --proxy-addr at the MongoDB instance and connect the application or mongosh to --listen-addr. Errors from FerretDB reach the client directly. With --mode=diff-proxy, MongoDB answers and FerretDB shows the difference between the two responses.
  2. Export the data with MongoDB’s own tools. mongodump --uri=... dumps every collection as BSON, and --db or --collection narrows it. mongoexport works one collection at a time with --db, --collection and --out.
  3. Import into FerretDB by pointing mongorestore --uri=... at the FerretDB instance from the dump folder, or mongoimport with --file for each exported collection.

Pitfalls

公式ガイド

FerretDBの移行ガイド ↗

2026-09-29にレビュー済み。

出典

MongoDBのその他の代替 →