错误:
2019-04-16T20:09:07.406+0800 the --db and --collection args should only be used when restoring from a BSON file. Other uses are deprecated and will not exist in the future; use --nsInclude instead
2019-04-16T20:09:07.442+0800 building a list of collections to restore from C:\Users\bo\Desktop\test dir
2019-04-16T20:09:07.449+0800 reading metadata for at.._products from C:\Users\bo\Desktop\test\._products.metadata.json
2019-04-16T20:09:07.450+0800 Failed: at.._products: error parsing metadata from C:\Users\bo\Desktop\test\._products.metadata.json: invalid character '\x00' looking for beginning of value
解决办法:
方法1:修改metadata.json文件,将属性去掉;
方法2:在执行mongorestore命令的时候加上–noOptionsRestore参数