mongoimportjson1
The mongo import tool
Usage
mongoimportjson [OPTIONS]
Overview
mongoimportjson is a tool to import JSON documents into MongoDB. This utility takes a single file that contains one JSON string per line and inserts it. A databaase and collection must be specified.
Options
-
--help -
show usage information
-
-h, --host HOST -
server to connect to (default HOST=localhost)
-
-d, --db DATABASE -
database to use
-
-c, --c COLLECTION -
collection to use
-
--file FILE -
file from which to import
-
--dbpath PATH -
directly access mongod data files in this path, instead of connecting to a mongod instance
-
--idbefore -
create id index before importing
-
--id -
create id index after importing (recommended)
-
--drop -
drop collection before importing