1

I am using mongodump command to take backup of an Azure Cosmos DB. It runs for some time and is then failing with Failed: error writing data for collection test.testcollection to disk: error reading collection:[-3]) incomplete read of full message: read tcp x.x.x.x:xxxxx->x.x.x.x:xxxxx: read: connection reset by peer

In one of the attempts it had run for an hour and then failed with the above error. Is there any setting on the Azure side which needs to be changed or any option in the mongodump to be changed?

I was expecting the dump to be succesful. Instead the command is failing. Tried the command with the verbose mode as well but that did not proceed as well.

Ankit
  • 11
  • 2

1 Answers1

0

In your mongodump script, try to add --forceTableScan and see if this helps.

Azure Cosmos DB automatically takes backups of your data at regular intervals. The automatic backups are taken without affecting the performance or availability of the database operations. All the backups are stored separately in a storage service. The automatic backups are helpful in scenarios when you accidentally delete or update your Azure Cosmos DB account, database, or container and later require the data recovery. Azure Cosmos DB backups are encrypted with Microsoft managed service keys. These backups are transferred over a secure non-public network. Which means, backup data remains encrypted while transferred over the wire and at rest. Backups of an account in a given region are uploaded to storage accounts in the same region.

There are 2 backup modes: Continuous and Periodic

Refer more here: Online backup and on-demand data restore in Azure Cosmos DB