MongoDB Documentation, Release 3.0.4 Backup a Database with mongodump mongodump does not dump the content of the local database. To back up all the databases in a cluster via mongodump , you should have the backup (page 410) role. The backup (page 410) role provides the required privileges for backing up all databases. The role confers no additional access, in keeping with the policy of least privilege . To back up a given database, you must have read access on the database. Several roles provide this access, including the backup (page 410) role. To back up the system.profile (page 291) collection, which is created when you activate database profiling (page 215), you must have additional read access on this collection. Several roles provide this access, including the clusterAdmin (page 408) and dbAdmin (page 406) roles. To back up users and user-defined roles (page 325) for a given database, you must have access to the admin database. MongoDB stores the user data and role definitions for all databases in the admin database. Specifically, to back up a given database’s users, you must have the find (page 419) action (page 419) on the admin database’s admin.system.users (page 291) collection. The backup (page 410) and userAdminAnyDatabase (page 412) roles both provide this privilege. To back up the user-defined roles on a database, you must have the find (page 419) action on the admin database’s admin.system.roles (page 291) collection. Both the backup (page 410) and userAdminAnyDatabase (page 412) roles provide this privilege. Basic mongodump Operations The mongodump utility backs up data by connecting to a running mongod or mongos instance. The utility can create a backup for an entire server, database or collection, or can use a query to backup just part of a collection. When you run mongodump without any arguments, the command connects to the MongoDB instance on the local system (e.g. 127.0.0.1 or localhost ) on port 27017 and creates a database backup named dump/ in the current directory. To backup data from a mongod or mongos instance running on the same machine and on the default port of 27017 , use the following command: mongodump The data format used by mongodump from version 2.2 or later is incompatible with earlier versions of mongod . Do not use recent versions of mongodump to back up older data stores. You can also specify the --host and --port of the MongoDB instance that the mongodump should connect to. For example: mongodump --host mongodb.example.net --port 27017 mongodump will write BSON files that hold a copy of data accessible via the mongod listening on port 27017 of the mongodb.example.net host. See Create Backups from Non-Local mongod Instances (page 251) for more information. To specify a different output directory, you can use the --out or -o option: mongodump --out /data/backup/ To limit the amount of data included in the database dump, you can specify --db and --collection as options to mongodump . For example: Chapter 5. Administration 250 Changed in version 2.6.