Hi,
I’m trying to use mongorestore
to migrate data from one database to another. Both on Atlas. The dump is working fine, but mongorestore
is outputting the below messages. I have no clue what this means and a google search renders nothing remotely close. I’ve added hyphens to the beginning of each line to make it more readable.
– using write concern: &{majority false 0}
– will listen for SIGTERM, SIGINT, and SIGKILL
– connected to node type: replset
– The --db and --collection flags are deprecated for this use-case; please use --nsInclude instead, i.e. with --nsInclude=${DATABASE}.${COLLECTION}
– got error from options parsing: (AtlasError) getting non-bucket system collections is unsupported
– Failed: (AtlasError) getting non-bucket system collections is unsupported
– 0 document(s) restored successfully. 0 document(s) failed to restore.
The command I’m running
mongorestore --uri="mongodb+srv://username:password@hostname.mongodb.net/$DEV_DATABASE" \
--preserveUUID \
--drop \
--nsFrom="$PROD_DATABASE.*" \
--nsTo="$DEV_DATABASE.*" \
--verbose \
"dump/$PROD_DATABASE"
I’ve also tried creating an archive file with mongodump
and using that with --archive="filename"
, as well as piping stdout to mongorestore
. I’ve also checked that the user I’m using has the correct privileges. They have the role of Atlas admin
, which I’m assuming is correct. The dev cluster I’m trying to restore to is an M0 if that makes any difference.
I should also point out that I have minimal Mongo management experience, so I’m sure there’s something I’ve overlooked. Thanks for your help.