逆の問題だと思います.oplogオプションを使用する場合、データベースを指定できません。あなたが見つけたコード:
if (mongoRestoreGlobalParams.oplogReplay) {
// fail early if errors
if (toolGlobalParams.db != "") {
toolError() << "Can only replay oplog on full restore" << std::endl;
return -1;
}
oplogReplay とデータベースの両方を指定するとトリガーされます。
oplog は、特定のデータベースではなく、mongodb インスタンス全体に対するものであることに注意してください。--oplog を使用して mongodump を取得すると、インスタンス全体がダンプされるため、1 つのデータベースだけに再ロードすることはできません。
それはかなり不十分に文書化されています。Mongolab は、ドキュメントでそれをほのめかしています。
Point-in-time method
Applicable to Dedicated plans only
If you have a Dedicated plan, you can take server-wide mongodumps to export all of the databases on the server.
This method is useful because it allows you to use the the --oplog and --oplogReplay options to mongodump and mongorestore (respectively). The options allow for a point-in-time snapshot of the server by also including the oplog in the dump. This oplog is then replayed when you use the --oplogReplay option upon restore.
しかし、それはあまり明確ではありません。