Is it possible to resume mongo backup restoration after failure? I'm getting an error

2021-07-01T23:35:01.944+0200    Failed: dbname.collectionname_backup: error restoring from archive 'mongodb-db-backup.gz': connection(db-url.com:27017[-4]) incomplete read of message header: read tcp> read: operation timed out
2021-07-01T23:35:01.944+0200    851000 document(s) restored successfully. 0 document(s) failed to restore.

Also probably it's possible to make the timeout longer?

UPD. The command I use to restore.

mongorestore --noIndexRestore --host mongo.host.co --gzip --archive=mongodb-backup.gz -u ..... -p ....... --authenticationDatabase admin
  • Welcome to DBA.SE. What command did you initially use to start the restore? What command was used to create the backup? Could you please edit your question and these details? Thanks. Currently you are asking for a solution to an error message. That's hard to accomplish without more details.
    – John K. N.
    Jul 2 at 10:45
  • Thank you. Just added the command I use to restore. I don't have a command used to backup because the backup was made not by me. Jul 2 at 10:51
  • If I try to use the same command to resume the restore I got a lot of errors because of duplicated keys. Jul 2 at 10:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.