
mongodump
List of commands for mongodump:
-
mongodump:tldr:1e312 mongodump: Create a dump of a given collection within a given database.$ mongodump --collection ${collection_name} --db ${database_name}try on your machineexplain this command
-
mongodump:tldr:66fc2 mongodump: Create a dump from a specific instance; host, user, password and database will be defined in the connection string.$ mongodump --uri ${connection_string}try on your machineexplain this command
-
mongodump:tldr:81b65 mongodump: Create a dump of a given database.$ mongodump --db ${database_name}try on your machineexplain this command
-
mongodump:tldr:a70a5 mongodump: Create a dump of a given database with a given username; user will be prompted for password.$ mongodump --username ${username} ${database} --passwordtry on your machineexplain this command
-
mongodump:tldr:b3a27 mongodump: Create a dump of all databases (this will place the files inside a directory called "dump").$ mongodumptry on your machineexplain this command
-
mongodump:tldr:e58f9 mongodump: Specify an output location for the dump.$ mongodump --out ${path-to-directory}try on your machineexplain this command
-
mongodump:tldr:fd5ea mongodump: Connect to a given host running on a given port, and create a dump.$ mongodump --host ${host} --port ${port}try on your machineexplain this command