./mongodump -h 127.0.0.1:27017 -d test -o /opt/mongodb/data -u test -p 123456
-h --host --port
-d --db=<database-name>
-o --out=<directory-path>
-u --username
-p --password
[root@master bin]# ./mongorestore -h 127.0.0.1:27017 -d test -u test -p 123456 /opt/mongodb/data/test
-h 指定ip和port
-d 指定数据库
-u 指定用户名
-p 指定密码