mongorestore

mongorestore

TLDR

Import a BSON data dump from a directory to a MongoDB database

$ mongorestore --db [database_name] [path/to/directory]
copy

Import a BSON data dump from a directory to a given database in a MongoDB server host, running at a given port, with user authentication (user will be prompted for password)

$ mongorestore --host [database_host:port] --db [database_name] --username [username] [path/to/directory] --password
copy

Import a collection from a BSON file to a MongoDB database

$ mongorestore --db [database_name] [path/to/file]
copy

Import a collection from a BSON file to a given database in a MongoDB server host, running at a given port, with user authentication (user will be prompted for password)

$ mongorestore --host [database_host:port] --db [database_name] --username [username] [path/to/file] --password
copy

Copied to clipboard
Stream 500+ movies for free and without signup