Usage: mongorestore Restore backups generated with mongodump to a running server. Specify a database with -d to restore a single database from the target directory, or use -d and -c to restore a single collection from a single .bson file. Connection strings must begin with mongodb:// or mongodb+srv://. See http://docs.mongodb.com/database-tools/mongorestore/ for more information. general options: --help print usage --version print the tool version and exit --config= path to a configuration file verbosity options: -v, --verbose= more detailed log output (include multiple times for more verbosity, e.g. -vvvvv, or specify a numeric value, e.g. --verbose=N) --quiet hide all log output connection options: -h, --host= mongodb host to connect to (setname/host1,host- 2 for replica sets) --port= server port (can also use --host hostname:port) ssl options: --ssl connect to a mongod or mongos that has ssl enabled --sslCAFile= the .pem file containing the root certificate chain from the certificate authority --sslPEMKeyFile= the .pem file containing the certificate and key --sslPEMKeyPassword= the password to decrypt the sslPEMKeyFile, if necessary --sslCRLFile= the .pem file containing the certificate revocation list --sslFIPSMode use FIPS mode of the installed openssl library --tlsInsecure bypass the validation for server's certificate chain and host name authentication options: -u, --username= username for authentication -p, --password= password for authentication --authenticationDatabase= database that holds the user's credentials --authenticationMechanism= authentication mechanism to use --awsSessionToken= session token to authenticate via AWS IAM kerberos options: --gssapiServiceName= service name to use when authenticating using GSSAPI/Kerberos (default: mongodb) --gssapiHostName= hostname to use when authenticating using GSSAPI/Kerberos (default: ) namespace options: -d, --db= database to use -c, --collection= collection to use uri options: --uri=mongodb-uri mongodb uri connection string namespace options: --excludeCollection= DEPRECATED; collection to skip over during restore (may be specified multiple times to exclude additional collections) --excludeCollectionsWithPrefix= DEPRECATED; collections to skip over during restore that have the given prefix (may be specified multiple times to exclude additional prefixes) --nsExclude= exclude matching namespaces --nsInclude= include matching namespaces --nsFrom= rename matching namespaces, must have matching nsTo --nsTo= rename matched namespaces, must have matching nsFrom input options: --objcheck validate all objects before inserting --oplogReplay for recovering a point-in-time snapshot on a replica set that is not part of a sharded cluster. --oplogLimit=[:ordinal] only include oplog entries before the provided Timestamp --oplogFile= oplog file to use for replay of oplog --archive= restore dump from the specified archive file. If flag is specified without a value, archive is read from stdin --restoreDbUsersAndRoles restore user and role definitions for the given database --dir= input directory, use '-' for stdin --gzip decompress gzipped input restore options: --drop drop each collection before import --dryRun view summary without importing anything. recommended with verbosity --writeConcern= write concern options e.g. --writeConcern majority, --writeConcern '{w: 3, wtimeout: 500, fsync: true, j: true}' --noIndexRestore don't restore indexes --noOptionsRestore don't restore collection options --keepIndexVersion don't update index version --maintainInsertionOrder restore the documents in the order of their appearance in the input source. By default the insertions will be performed in an arbitrary order. Setting this flag also enables the behavior of --stopOnError and restricts NumInsertionWorkers- PerCollection to 1. -j, --numParallelCollections= number of collections to restore in parallel --numInsertionWorkersPerCollection= number of insert operations to run concurrently per collection --stopOnError halt after encountering any error during insertion. By default, mongorestore will attempt to continue through document validation and DuplicateKey errors, but with this option enabled, the tool will stop instead. A small number of documents may be inserted after encountering an error even with this option enabled; use --maintainInsertion- Order to halt immediately after an error --bypassDocumentValidation bypass document validation --preserveUUID preserve original collection UUIDs (off by default, requires drop)