Difference between revisions of "Mongodump"
Jump to navigation
Jump to search
↑ https://docs.mongodb.com/database-tools/mongodump/
Tags: Mobile web edit, Mobile edit |
Tags: Mobile web edit, Mobile edit |
||
Line 6: | Line 6: | ||
Database backup: | Database backup: | ||
* <code>[[mongodump]] --archive=test.20150715.archive --db your_db_name</code> (Use: <code>[[show dbs]]</code> to view available DBs) | * <code>[[mongodump]] --archive=test.20150715.archive --db your_db_name</code> (Use: <code>[[show dbs]]</code> to view available DBs) | ||
− | + | * <code>mongodump --db=test --collection=records</code> | |
== [[Sharded]] Clusters == | == [[Sharded]] Clusters == |
Revision as of 14:24, 13 April 2020
mongodump
[1] reads data from a MongoDB database and creates high fidelity BSON files which the mongorestore tool can use to populate a MongoDB database. mongodump provides the --oplog option to include in its output oplog entries that occur during the mongodump operation
Database backup:
mongodump --archive=test.20150715.archive --db your_db_name
(Use:show dbs
to view available DBs)mongodump --db=test --collection=records
Sharded Clusters
Backups created with mongodump
do not maintain the atomicity guarantees of transactions across shards
Related commands
mysqldump
mariabackup
mongorestore
Ops manager
requires Enterprise Advanced subscriptions
See also
- MongoDB: MongoDB Compass,
mongo
,mongodump, mongorestore
,mongoexport
, MongoDB changelog, MongoDB Enterprise Kubernetes Operator, GridFS, MongoDB Atlas, MongoDB replication, Ops Manager, docker logs mongodb, show collections, show dbs,mongo --help
- MongoDB:
mongodump
, PostgreSQL:pg_dump
, MariaDB: mysqldump
Advertising: