Migrate into MongoDB
Tested with: MongoDB (Percona Server) 8.0 on Databasezy · zb CLI 0.1
Sources: MongoDB Atlas, Railway, DigitalOcean, self-hosted MongoDB or FerretDB, Docker containers, mongodump archives (.bson.tar), another Databasezy instance.
How the copy works
Section titled “How the copy works”mongodump --archive | mongorestore --archive, streamed with no intermediate file. --include maps to
--nsInclude, and a different target database name is mapped with --nsFrom/--nsTo. Uploaded .bson.tar files
are unpacked and restored with mongorestore --dir.
FerretDB and MongoDB speak the same wire protocol, so MongoDB to FerretDB and FerretDB to MongoDB use the same path; FerretDB reports index options it does not support.
Run it
Section titled “Run it”# --dry-run prints the preflight checklist and the exact plan without changing anythingzb migrate --from ./app.bson.tar --engine mongodb --to inst_abczb migrate --from local --engine mongodb --db app --to inst_abc # mongodump --archive locallyFollow it with zb migrate status <mig_id>, or in the portal under the instance’s Migrate in tab.
What is verified
Section titled “What is verified”Document count per collection and the total index count. Mismatches are listed in the result; nothing is switched for you.
Not carried over
Section titled “Not carried over”- Copy only; change-stream sync is not offered.
- Atlas Search indexes, triggers and Data API settings are Atlas features and are not copied.
- Users and roles are not copied.
How migrations work covers preflight, verification and cutover; engine conversions covers moves between engines.