Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

234
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda