dump a collection and unable to restore it
Closed this issue · 0 comments
boly38 commented
Issue
While playing with node-mongotools, I'm able to use collection
option that dump a given collection only.
but if I try to restore it, I got a success but with 0 entries restored:
2023-01-08T14:32:05.806+0100 0 document(s) restored successfully. 0 document(s) failed to restore.
How to fix
In order to restore a collection, the target mongorestore nsInclude
arg must match collection to restore too
using --nsInclude=myDb.*
instead of --nsInclude=mmyDb
Expect
I expect node mongotools wrapper to add nsInclude
wildcard on the following context:
- restoring a backup
- having
collection
set in options