Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error while mongorestore - assertion: 17370 Restoring users and roles is only supported for clusters with auth schema versions 1 or 3, found: 5

I am trying to restore a folder which was created using mongodump, and I am using mongorestore. But there is an error:

assertion: 17370 Restoring users and roles is only supported for clusters with auth schema versions 1 or 3, found: 5

How can I solve this error and successfully restore?

like image 423
Riken Shah Avatar asked Jun 25 '15 07:06

Riken Shah


People also ask

How to restore the database in MongoDB?

The mongorestore utility restores a binary backup created by mongodump . By default, mongorestore looks for a database backup in the dump/ directory. The mongorestore utility restores data by connecting to a running mongod directly. mongorestore can restore either an entire database backup or a subset of the backup.

How do I get Mongorestore?

The mongorestore command is the sister command of the mongodump command. You can restore the dumps (backups) created by the mongodump command into a MongoDB instance using the mongorestore command.

Does Mongorestore overwrite data?

However, mongorestore performs inserts only and does not perform updates. That is, if restoring documents to an existing database and collection and existing documents have the same value _id field as the to-be-restored documents, mongorestore will not overwrite those documents.


1 Answers

I was able to restore the individual databases one at a time using the --db parameter.

like image 189
Riken Shah Avatar answered Oct 16 '22 12:10

Riken Shah