错误“'mongodump' 未被识别为内部或外部命令、可运行程序或批处理文件。”试图从 mongodb 5.0 转储数据库

Error "'mongodump' is not recognized as an internal or external command, operable program or batch file." trying to dump the database from mongodb 5.0

我正在尝试从 mongodb 转储数据库,但我在 运行 以管理员身份从命令行执行命令时遇到无法识别的错误。 mongodump --db 忍者, 我在 mongodb 的环境变量中添加了路径变量。我仍然收到错误。 请帮忙。谢谢

您必须另外安装 MongoDB Database Tools 才能在 CLI 中使用 mongodump。如果您需要恢复数据,安装 MongoDB 数据库工具后,您也可以在 CLI 中使用 mongorestore

您可以在 official MongoDB download page, and then you can follow the official installation guide 下载 MongoDB 数据库工具。