{"id":13511637,"url":"https://github.com/mongodb/mongo-tools","last_synced_at":"2025-11-11T21:06:59.130Z","repository":{"id":20595518,"uuid":"23876346","full_name":"mongodb/mongo-tools","owner":"mongodb","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-07T19:05:07.000Z","size":52223,"stargazers_count":1016,"open_issues_count":22,"forks_count":365,"subscribers_count":100,"default_branch":"master","last_synced_at":"2025-05-07T21:15:54.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mongodb.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-09-10T13:56:13.000Z","updated_at":"2025-05-07T19:05:12.000Z","dependencies_parsed_at":"2023-02-16T11:00:42.711Z","dependency_job_id":"7b2b8a35-caf4-4817-85b9-73bc7c2cc8de","html_url":"https://github.com/mongodb/mongo-tools","commit_stats":{"total_commits":2324,"total_committers":96,"mean_commits":"24.208333333333332","dds":0.8739242685025818,"last_synced_commit":"a5bb3a149a1fa96d3bb782335f870520653d09a6"},"previous_names":[],"tags_count":458,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fmongo-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb","download_url":"https://codeload.github.com/mongodb/mongo-tools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254235687,"owners_count":22036962,"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-08-01T03:01:02.505Z","updated_at":"2025-11-11T21:06:54.095Z","avatar_url":"https://github.com/mongodb.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# MongoDB Tools\n\n- **bsondump** - _display BSON files in a human-readable format_\n- **mongoimport** - _Convert data from JSON, TSV or CSV and insert them into a collection_\n- **mongoexport** - _Write an existing collection to CSV or JSON format_\n- **mongodump/mongorestore** - _Dump MongoDB backups to disk in .BSON format, or restore them to a\n  live database_\n- **mongostat** - _Monitor live MongoDB servers, replica sets, or sharded clusters_\n- **mongofiles** - _Read, write, delete, or update files in\n  [GridFS](http://docs.mongodb.org/manual/core/gridfs/)_\n- **mongotop** - _Monitor read/write activity on a mongo server_\n\nReport any bugs, improvements, or new feature requests at https://jira.mongodb.org/browse/TOOLS\n\n## Building Tools\n\nWe currently build the tools with Go version 1.15. Other Go versions may work but they are untested.\n\nUsing `go get` to directly build the tools will not work. To build them, it's recommended to first\nclone this repository:\n\n```\ngit clone https://github.com/mongodb/mongo-tools\ncd mongo-tools\n```\n\nThen run `./make build` to build all the tools, placing them in the `bin` directory inside the\nrepository. Run `./bin/mongodump --help` to verify that the built binary works.\n\nYou can also build a subset of the tools using the `-pkgs` option. For example,\n`./make build -pkgs=mongodump,mongorestore` builds only `mongodump` and `mongorestore`.\n\nTo use the build/test scripts in this repository, you **_must_** set GOROOT to your Go root\ndirectory. This may depend on how you installed Go.\n\n```\nexport GOROOT=/usr/local/go\n```\n\n### Mac OS only:\n\nWhen running the built binaries, if the process gets killed immediately and you see the following\noutput:  \n`zsh: killed ./bin/mongodump --help`  \nThen you need to sign the binary in order to run it:  \n`codesign --force --sign - bin/mongodump`\n\nYou can also choose to configure the security policy of the terminal application so that signing is\nnot required:  \n(in macOS Sonoma) System Settings \u003e Privacy \u0026 Security \u003e Developer Tools\n\n## Updating Dependencies\n\nStarting with version 100.3.1, the tools use `go mod` to manage dependencies. All dependencies are\nlisted in the `go.mod` file and are directly vendored in the `vendor` directory.\n\nIn order to make changes to dependencies, you first need to change the `go.mod` file. You can\nmanually edit that file to add/update/remove entries, or you can run the following in the repository\ndirectory:\n\n```\ngo mod edit -require=\u003cpackage\u003e@\u003cversion\u003e  # for adding or updating a dependency\ngo mod edit -droprequire=\u003cpackage\u003e        # for removing a dependency\n```\n\nThen run `go mod vendor -v` to reconstruct the `vendor` directory to match the changed `go.mod`\nfile.\n\nOptionally, run `go mod tidy -v` to ensure that the `go.mod` file matches the `mongo-tools` source\ncode.\n\n## Contributing\n\nSee our [Contributor's Guide](CONTRIBUTING.md).\n\n## Documentation\n\nSee the MongoDB packages [documentation](https://docs.mongodb.org/database-tools/).\n\nFor documentation on older versions of the MongoDB, reference that version of the\n[MongoDB Server Manual](docs.mongodb.com/manual):\n\n- [MongoDB 4.2 Tools](https://docs.mongodb.org/v4.2/reference/program)\n- [MongoDB 4.0 Tools](https://docs.mongodb.org/v4.0/reference/program)\n- [MongoDB 3.6 Tools](https://docs.mongodb.org/v3.6/reference/program)\n\n## Adding New Platforms Support\n\nSee our [Adding New Platform Support Guide](PLATFORMSUPPORT.md).\n\n## Vendoring the Change into Server Repo\n\nSee our [Vendor the Change into Server Repo](SERVERVENDORING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb%2Fmongo-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fmongo-tools/lists"}