mongo-tools

module
v0.0.0-...-ac81b06 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2015 License: Apache-2.0

README

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
  • mongooplog - Replay oplog entries between MongoDB servers
  • mongotop - Monitor read/write activity on a mongo server

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

Setup

Clone the repo and run . ./set_gopath.sh (set_gopath.bat on Windows) to setup your GOPATH:

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

Building Tools

To build the tools, you need to have Go version 1.3 and up.

An additional flag, -tags, can be passed to the go build command 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 # build mongoimport
go build -o bin/mongoimport -tags ssl mongoimport/main/mongoimport.go # build mongoimport with SSL support enabled
go build -o bin/mongoimport -tags "ssl sasl" mongoimport/main/mongoimport.go # build mongoimport with SSL and SASL support enabled

Contributing

See our Contributor's Guide.

Documentation

See the MongoDB packages documentation.

Directories

Path Synopsis
Package bsondump converts BSON files into human-readable formats such as JSON.
Package bsondump converts BSON files into human-readable formats such as JSON.
main
Main package for the bsondump tool.
Main package for the bsondump tool.
Package common contains subpackages that are shared amongst the mongo tools.
Package common contains subpackages that are shared amongst the mongo tools.
auth
Package auth provides utilities for performing tasks related to authentication.
Package auth provides utilities for performing tasks related to authentication.
bsonutil
Package bsonutil provides utilities for processing BSON data.
Package bsonutil provides utilities for processing BSON data.
db
Package db implements generic connection to MongoDB, and contains subpackages for specific methods of connection.
Package db implements generic connection to MongoDB, and contains subpackages for specific methods of connection.
db/kerberos
Package kerberos implements connection to MongoDB using kerberos.
Package kerberos implements connection to MongoDB using kerberos.
db/openssl
Package openssl implements connection to MongoDB over ssl.
Package openssl implements connection to MongoDB over ssl.
intents
Package intents provides utilities for performing dump/restore operations.
Package intents provides utilities for performing dump/restore operations.
json
Package json implements encoding and decoding of JSON objects as defined in RFC 4627.
Package json implements encoding and decoding of JSON objects as defined in RFC 4627.
log
Package log provides a utility to log timestamped messages to an io.Writer.
Package log provides a utility to log timestamped messages to an io.Writer.
options
Package options implements command-line options that are used by all of the mongo tools.
Package options implements command-line options that are used by all of the mongo tools.
password
Package password handles cleanly reading in a user's password from the command line.
Package password handles cleanly reading in a user's password from the command line.
progress
Package progress exposes utilities to asynchronously monitor and display processing progress.
Package progress exposes utilities to asynchronously monitor and display processing progress.
testutil
Package testutil implements functions for filtering and configuring tests.
Package testutil implements functions for filtering and configuring tests.
text
Package text provides utilities for formatting text data.
Package text provides utilities for formatting text data.
util
Package util provides commonly used utility functions.
Package util provides commonly used utility functions.
Package mongodump creates BSON data from the contents of a MongoDB instance.
Package mongodump creates BSON data from the contents of a MongoDB instance.
main
Main package for the mongodump tool.
Main package for the mongodump tool.
Package mongoexport produces a JSON or CSV export of data stored in a MongoDB instance.
Package mongoexport produces a JSON or CSV export of data stored in a MongoDB instance.
main
Main package for the mongoexport tool.
Main package for the mongoexport tool.
Package mongofiles provides an interface to GridFS collections in a MongoDB instance.
Package mongofiles provides an interface to GridFS collections in a MongoDB instance.
main
Main package for the mongofiles tool.
Main package for the mongofiles tool.
Package mongoimport allows importing content from a JSON, CSV, or TSV into a MongoDB instance.
Package mongoimport allows importing content from a JSON, CSV, or TSV into a MongoDB instance.
csv
Package csv reads and writes comma-separated values (CSV) files.
Package csv reads and writes comma-separated values (CSV) files.
main
Main package for the mongoimport tool.
Main package for the mongoimport tool.
Package mongooplog polls operations from the replication oplog of one server, and applies them to another.
Package mongooplog polls operations from the replication oplog of one server, and applies them to another.
main
Main package for the mongooplog tool.
Main package for the mongooplog tool.
Package mongorestore writes BSON data to a MongoDB instance.
Package mongorestore writes BSON data to a MongoDB instance.
main
Main package for the mongorestore tool.
Main package for the mongorestore tool.
Package mongostat provides an overview of the status of a currently running mongod or mongos instance.
Package mongostat provides an overview of the status of a currently running mongod or mongos instance.
main
Main package for the mongostat tool.
Main package for the mongostat tool.
Package mongotop provides a method to track the amount of time a MongoDB instance spends reading and writing data.
Package mongotop provides a method to track the amount of time a MongoDB instance spends reading and writing data.
main
Main package for the mongotop tool.
Main package for the mongotop tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL