mongodump

Utility to export the contents of a MongoDB instance. More information: https://docs.mongodb.com/database-tools/mongodump/.

mongodump

mongodump --out path/to/directory

mongodump --db database_name

mongodump --collection collection_name --db database_name

mongodump --host host --port port

mongodump --username username database --password

mongodump --uri connection_string