{"id":20820228,"url":"https://github.com/muhammadn/mongoex","last_synced_at":"2025-10-24T19:07:16.085Z","repository":{"id":61019813,"uuid":"547407376","full_name":"muhammadn/mongoex","owner":"muhammadn","description":"MongoDB Data Management tool","archived":false,"fork":false,"pushed_at":"2023-01-30T06:36:47.000Z","size":3541,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-18T16:31:52.816Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/muhammadn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-10-07T16:24:25.000Z","updated_at":"2022-10-08T12:30:53.000Z","dependencies_parsed_at":"2023-02-16T04:45:20.375Z","dependency_job_id":null,"html_url":"https://github.com/muhammadn/mongoex","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadn%2Fmongoex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadn%2Fmongoex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadn%2Fmongoex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhammadn%2Fmongoex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhammadn","download_url":"https://codeload.github.com/muhammadn/mongoex/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243166707,"owners_count":20246960,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T22:08:42.326Z","updated_at":"2025-10-24T19:07:11.039Z","avatar_url":"https://github.com/muhammadn.png","language":"Go","readme":"# mongoex - Yet another way to copy mongodb data\n\nI've looked at options like `mongomirror` (which is for whole for whole cluster, not per database/collection). I've looked at `mongodump` and `mongorestore` but there require disk space on the server that's doing the migration and is not feasible if the data is larger than the server's disk space.\n\nSo `mongoex` is a combination of both `mongodump` and `mongorestore` without the need to use any disk space and can select per database/collection if you need to.\n\nThere is only one subcomamd at the moment which is \"migrate\". If you dig into the source codes you will find other subcommands but these are still a WIP.\n\nExample for copying whole databases:\n\n```\nmongoex migrate -s mongodb+srv://yourusername:yourpassword@cluster0.abc123.mongodb.net/\\?retryWrites=true\\\u0026w=majority -d mongodb+srv://yourusername:yourpassword@cluster0.53yz2fy.mongodb.net/\\?retryWrites=true\\\u0026w=majority --dbsrc sample_restaurants --dbdest sample_airbnb\n```\n\nExample for selective collections to copy:\n```\nmongoex migrate -s mongodb+srv://yourusername:yourpassword@cluster0.abc123.mongodb.net/\\?retryWrites=true\\\u0026w=majority -d mongodb+srv://yourusername:yourpassword@cluster0.53yz2fy.mongodb.net/\\?retryWrites=true\\\u0026w=majority --dbsrc sample_restaurants --dbdest sample_airbnb -c collection1,collection2,collection3...\n```\n\n`NOTE: -c flag for collection will get those collection from --dbsrc database`\n\nTry using `--help` flag to see the options, normally you will see this:\n\n```\nmongoex is a tool to migrate mongodb data in real time.\nThis tool helps to quickly do migrations to move data, especially from production to pre-prod for testing\n\nUsage:\n  mongoex [command]\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  help        Help about any command\n  migrate     Migrates data from a source MongoDB to destination MongoDB\n\nFlags:\n  -h, --help   help for mongoex\n\nUse \"mongoex [command] --help\" for more information about a command.\n```\n\nDoing automated Point-in-Time Recovery to a temporary cluster\n\nNOTE: To do this, you need to enable API Access List for your API Key - https://mongodb.com/docs/atlas/configure-api-access/#std-label-enable-api-access-list\n```\nmongoex atlas pointintime --targetClusterName tempCluster --sourceProject YourSourceProject --sourceClusterName YourSourceClusterYouWantToRestoreFrom --targetProject YouTargetProject --time 1668040812\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadn%2Fmongoex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhammadn%2Fmongoex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhammadn%2Fmongoex/lists"}