-
Type: Bug
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: 3.4.12
-
Component/s: mongodump, mongorestore
-
None
-
Environment:Ubuntu 16.04
if you dump a collection of the admin.system.* namespace, you got an error when trying to restore it. ex: with the system.roles collection
Mongodump
mongodump --authenticationDatabase admin -d admin -c system.roles --archive=roles.archive --gzip -u admin
Mongorestore
mongorestore --drop --authenticationDatabase admin --archive=roles.archive --gzip -u admin
You get the following error:
2019-10-08T16:39:19.372+0200 preparing collections to restore from 2019-10-08T16:39:19.383+0200 assuming users in the dump directory are from <= 2.4 (auth version 1) 2019-10-08T16:39:19.384+0200 Failed: the users and roles collections in the dump have an incompatible auth version with target server: cannot restore users of auth version 1 to a server of auth version 5
I'm dumping and restoring from the same mongoDB server!
If i do not specify a given collection but the full admin db for the dump, it works!