mongodump -h dbhost -d dbname -o dbdirectory
mongorestore -h dbhost -d dbname -directoryperdb dbdirectory
mongoexport -h dbhost -d dbname -c collectionname -f collectionKey -o dbdirectory
mongoimport -d dbhost -c collectionname -type csv -headerline -file
-type: 指明要导入的文件格式
-headerline: 批明不导入第一行,因为第一行是列名
-file: 指明要导入的文件路径
因篇幅问题不能全部显示,请点此查看更多更全内容