mongorestore
restores MongoDB data from mongodump output
TLDR
Restore from dump directory
$ mongorestore [dump/]
Restore specific database$ mongorestore --db=[database] [dump/database/]
Restore to remote host$ mongorestore --host=[hostname] --port=[27017] [dump/]
Restore with drop$ mongorestore --drop [dump/]
Restore from archive$ mongorestore --archive=[backup.archive]
SYNOPSIS
mongorestore [options] [directory]
DESCRIPTION
mongorestore restores MongoDB data from mongodump output. Part of MongoDB Database Tools. Restores BSON files to MongoDB collections. Supports full and selective restoration.
PARAMETERS
--db name
Target database name.--collection name
Target collection.--drop
Drop collections before restore.--host host
MongoDB host.--archive file
Restore from archive file.--gzip
Decompress gzipped input.
SEE ALSO
mongodump(1), mongoexport(1)

