./mongodump -h localhost -d liongo -o ./
错误方式:
会报错:
2017-01-27T15:31:54.217+0800 error parsing command line options: --dbpath and related flags are not supported in 3.0 tools. See http://dochub.mongodb.org/core/tools-dbpath-deprecated for more information 2017-01-27T15:31:54.217+0800 try 'mongorestore --help' for more information
使用mongorestore –help,正确还原方式为(去掉–directoryperdb):
too many positional arguments错误
这个文件名中间有个空格 就导致了接下来too many positional arguments错误的产生