• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

bsondump/H30-Sep-2020-

etc/H30-Sep-2020-

legacy/H30-Sep-2020-

mongodump/H30-Sep-2020-

mongoexport/H30-Sep-2020-

mongofiles/H30-Sep-2020-

mongoimport/H30-Sep-2020-

mongoreplay/H03-May-2022-

mongorestore/H30-Sep-2020-

mongostat/H30-Sep-2020-

mongotop/H30-Sep-2020-

test/H30-Sep-2020-

testdata/certs/H30-Sep-2020-

vendor/H30-Sep-2020-

.eslintrc.ymlH A D30-Sep-20204 KiB

.gitattributesH A D30-Sep-202070

.gitignoreH A D30-Sep-2020179

CONTRIBUTING.mdH A D30-Sep-20202.9 KiB

Gopkg.lockH A D30-Sep-202010.4 KiB

Gopkg.tomlH A D30-Sep-20203 KiB

LICENSE.mdH A D30-Sep-2020554

README.mdH A D30-Sep-20202.1 KiB

THIRD-PARTY-NOTICESH A D30-Sep-2020179.2 KiB

binaryurl.pyH A D30-Sep-20202.8 KiB

build.shH A D30-Sep-2020878

common-pvt.ymlH A D30-Sep-20209.7 KiB

common.ymlH A D30-Sep-202061.3 KiB

runTests.shH A D30-Sep-20201.5 KiB

set_goenv.shH A D30-Sep-20203.6 KiB

test.shH A D30-Sep-2020330

README.md

1MongoDB Tools
2===================================
3
4 - **bsondump** - _display BSON files in a human-readable format_
5 - **mongoimport** - _Convert data from JSON, TSV or CSV and insert them into a collection_
6 - **mongoexport** - _Write an existing collection to CSV or JSON format_
7 - **mongodump/mongorestore** - _Dump MongoDB backups to disk in .BSON format, or restore them to a live database_
8 - **mongostat** - _Monitor live MongoDB servers, replica sets, or sharded clusters_
9 - **mongofiles** - _Read, write, delete, or update files in [GridFS](http://docs.mongodb.org/manual/core/gridfs/)_
10 - **mongotop** - _Monitor read/write activity on a mongo server_
11 - **mongoreplay** - _Capture, observe, and replay traffic for MongoDB_
12
13
14Report any bugs, improvements, or new feature requests at https://jira.mongodb.org/browse/TOOLS
15
16Building Tools
17---------------
18To build the tools, you need to have Go version 1.9 and up. `go get` will not work; you
19need to clone the repository to build it.
20
21```
22git clone https://github.com/mongodb/mongo-tools
23cd mongo-tools
24```
25
26To use build/test scripts in the repo, you *MUST* set GOROOT to your Go root directory.
27
28```
29export GOROOT=/usr/local/go
30```
31
32### Quick build
33
34The `build.sh` script builds all the tools, placing them in the `bin`
35directory.  Pass any build tags (like `ssl` or `sasl`) as additional command
36line arguments.
37
38```
39./build.sh
40./build.sh ssl
41./build.sh ssl sasl
42```
43
44### Manual build
45
46Source `set_goenv.sh` and run the `set_goenv` function to setup your GOPATH and
47architecture-specific configuration flags:
48
49```
50. ./set_goenv.sh
51set_goenv
52```
53
54Pass tags to the `go build` command as needed in order to build the tools with
55support for SSL and/or SASL. For example:
56
57```
58mkdir bin
59go build -o bin/mongoimport mongoimport/main/mongoimport.go
60go build -o bin/mongoimport -tags ssl mongoimport/main/mongoimport.go
61go build -o bin/mongoimport -tags "ssl sasl" mongoimport/main/mongoimport.go
62```
63
64Contributing
65---------------
66See our [Contributor's Guide](CONTRIBUTING.md).
67
68Documentation
69---------------
70See the MongoDB packages [documentation](http://docs.mongodb.org/master/reference/program/).
71