One, remote connection MongoDB
Connection command:mongo-u username-p pwd 192.168.41.215:27017/database (database for user name)
Second,mongodump backup Database
Export command:mongodump-h IP--port Port-u user name-p password-d database-o file exists path
Detailed Explanation:
The server address where the-H:MONGODB is located (must specify a port), if not specified, is the local 127.0.0.1:27017
-U: User name
-P: Password
-D: The database that needs to be backed up (export entire mongodb is removed)
-O: Where the backed up data resides
Here is the section (export the entire MongoDB, or you can specify to export a database):
Third,mongodump backup Database
Format:mongorestore-h IP--port Port-u user name-p password-d database--drop file exists path
--drop is the first to delete all the data, and then restore, the following is the newly exported 4 databases data
Here's how to recover all the data:
Here is the recovery of the specified library:
Cond......
Reference from: http://blog.51yip.com/nosql/1573.html
MongoDB remote connection and Import Export data