# 备份,预先创建保存路径/data/mongo/mongo/backup,dataqulity是需要备份的数据库名称
./mongodump -h 192.168.118.128:27017 -d dataqulity -o /data/mongo/mongo/backup
#恢复 /data/mongo/mongo/backup/dataqulity/是上一步备份文件存放路径,主要要深入一层
./mongorestore -h 192.168.118.128:27017 -d dataqulity --dir /data/mongo/mongo/backup/dataqulity/