2

此查询与从现有的大型数据库构建小型 MongoDB 测试数据库有关。

我的执行计划如下:

a) 将 mongodump 与聚合查询一起使用,该查询指定将记录复制到测试数据库的条件。

这个想法会奏效吗?根据我在论坛上阅读的内容,在 mongodump 命令中使用 MongoDB 查询将不起作用。

对此的任何指导都非常感谢。

4

1 回答 1

2

You can use the following command to get the subset of the DB.

mongodump --query "your query here"

For more information read the mongodump documentation here.

于 2013-11-19T17:24:40.827 回答