Mongorestore - AtlasError - getting non-bucket system collections is unsupported


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://$DEV_DATABASE" \
  --preserveUUID \
  --drop \
  --nsFrom="$PROD_DATABASE.*" \
  --nsTo="$DEV_DATABASE.*" \
  --verbose \

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.

I posted this question on stackoverflow and someone suggested to remove the --preserveUUID, stating…

I don’t think Atlas lets you tweak the collection UUIDs.

Well, that did it. So for posterity, I’m adding this as the answer. Hopefully this helps someone else in the future :+1:


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.