Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

235
Views
Why isn't mongodump and mongorestore working?

I am doing to following to sync mongodb database between two instances as follows but it doesn't seem to work,anyone know what should I do to fix it?

mongodump --uri="mongodb://username1:PASSWORD1@x.y.z.w:27017" --db=databaseName  --archive="mongodbdump.bson"


mongorestore --username=username2 --password=password2 --authenticationDatabase=databaseName --host=replicaset1:port1,replicaset2:port2,replicaset3:port3 --archive=mongodbdump.bson

Error:

0 document(s) restored successfully. 41419 document(s) failed to restore
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

You probably have an unique index conflict with the _id, you need to use the --drop option

Before restoring the collections from the dumped backup, drops the collections from the target database. --drop does not drop collections that are not in the backup.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!