Skip to content
No description, website, or topics provided.
Go JavaScript Python Other
Branch: master
Clone or download

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bsondump TOOLS-2460 Attempt to parse positional arguments as URIs (Fix) (#221) Mar 6, 2020
etc TOOLS-2472: Automate linux package publishing Apr 13, 2020
installer TOOLS-2559: Fix rm message when uninstalling tools rpm package (#248) May 13, 2020
jstests TOOLS-2544: Add 4.4 tests to Evergreen (#237) May 13, 2020
mongodump Fix typo in --help output (#251) May 26, 2020
mongoexport TOOLS-2334: Skip system collections during oplog replay (#210) Mar 9, 2020
mongofiles TOOLS-2460 Attempt to parse positional arguments as URIs (Fix) (#221) Mar 6, 2020
mongoimport TOOLS-2334: Skip system collections during oplog replay (#210) Mar 9, 2020
mongorestore TOOLS-2593: Clarify where $admin dbs are skipped (#249) May 27, 2020
mongostat TOOLS-2513 Don't use ApplyURI in client configuration (#225) Mar 30, 2020
mongotop TOOLS-2460 Attempt to parse positional arguments as URIs (Fix) (#221) Mar 6, 2020
release TOOLS-2561: Correctly detect .sig extensions in artifacts May 1, 2020
test TOOLS-2544: Add 4.4 tests to Evergreen (#237) May 13, 2020
testdata/certs Migrate mongoreplay common packages to a legacy 'dir' Apr 24, 2019
vendor TOOLS-2555: Support directConnection option May 15, 2020
.eslintrc.yml TOOLS-1261 add linting to jstests Jun 27, 2016
.gitattributes Add .gitattributes - use linefeed for gpm, a bash script Sep 19, 2014
.gitignore minor: revendor dependencies Aug 8, 2019
CONTRIBUTING.md TOOLS-2152 Rationalize Test Types Dec 20, 2018
Gopkg.lock TOOLS-2555: Support directConnection option May 15, 2020
Gopkg.toml TOOLS-2555: Revendor mongo-tools-common and remove Go driver dependency May 15, 2020
LICENSE.md TOOLS-224 add license Dec 17, 2014
README.md TOOLS-2493: Release version 100.0.0 Mar 9, 2020
RELEASE.md TOOLS-2493: Release 100.0.0 Apr 27, 2020
THIRD-PARTY-NOTICES minor: Update THIRD-PARTY-NOTICES Jan 20, 2019
binaryurl.py TOOLS-2307 Evergreen: Add MongoDB 4.2 tests Jun 13, 2019
build.sh TOOLS-2418: Remove mongoreplay Feb 12, 2020
common-pvt.yml TOOLS-2302 Match server build variants Jul 10, 2019
common.yml TOOLS-2544: Add 4.4 tests to Evergreen (#237) May 13, 2020
runTests.sh TOOLS-2418: Remove mongoreplay Feb 12, 2020
set_goenv.sh TOOLS-2442: Refactor various parts of release code Feb 24, 2020
test.sh TOOLS-2152 Rationalize Test Types Dec 20, 2018

README.md

MongoDB Tools

  • bsondump - display BSON files in a human-readable format
  • mongoimport - Convert data from JSON, TSV or CSV and insert them into a collection
  • mongoexport - Write an existing collection to CSV or JSON format
  • mongodump/mongorestore - Dump MongoDB backups to disk in .BSON format, or restore them to a live database
  • mongostat - Monitor live MongoDB servers, replica sets, or sharded clusters
  • mongofiles - Read, write, delete, or update files in GridFS
  • mongotop - Monitor read/write activity on a mongo server

Report any bugs, improvements, or new feature requests at https://jira.mongodb.org/browse/TOOLS

Building Tools

To build the tools, you need to have Go version 1.9 and up. go get will not work; you need to clone the repository to build it.

git clone https://github.com/mongodb/mongo-tools
cd mongo-tools

To use build/test scripts in the repo, you MUST set GOROOT to your Go root directory.

export GOROOT=/usr/local/go

Quick build

The build.sh script builds all the tools, placing them in the bin directory. Pass any build tags (like ssl or sasl) as additional command line arguments.

./build.sh
./build.sh ssl
./build.sh ssl sasl

Manual build

Source set_goenv.sh and run the set_goenv function to setup your GOPATH and architecture-specific configuration flags:

. ./set_goenv.sh
set_goenv

Pass tags to the go build command as needed in order to build the tools with support for SSL and/or SASL. For example:

mkdir bin
go build -o bin/mongoimport mongoimport/main/mongoimport.go
go build -o bin/mongoimport -tags ssl mongoimport/main/mongoimport.go
go build -o bin/mongoimport -tags "ssl sasl" mongoimport/main/mongoimport.go

Contributing

See our Contributor's Guide.

Documentation

See the MongoDB packages documentation.

For documentation on older versions of the MongoDB, reference that version of the MongoDB Server Manual:

You can’t perform that action at this time.