2

I am dumping some collections and trying to restore them to cosmosDb

Dumping method

mongodump --host localhost:5960 --db test --collection ‘collectionName’ --gzip --out /mongoBackupFolder/

Restoring method

 mongorestore --host blahblah.azure.com --port 9999 -u user -p password --db dummyData --collection dummyData /mongoBackupDB/dummyData/dummyData.bson.gz --gzip --ssl --sslAllowInvalidCertificates

In some collections I have milions of data and sometimes during insertion time i am getting

Error 13 : Insert Error

Error 13 is 13 Unauthorized The request lacks the permissions to complete. Ensure you are using the correct keys.

The error in azure portal

  The portal is having issues getting an authentication token. The experience rendered may be degraded.
  • You can refer to [MongoDB - Command failed with error code 13 not authorized by ***** to execute this command](https://stackoverflow.com/questions/34864603/mongodb-command-failed-with-error-code-13-not-authorized-by-to-execute), [Azure MongoDB API Bulk Insert](https://stackoverflow.com/questions/43835779/azure-mongodb-api-bulk-insert) and [How to recover from error during bulk insert in MongoDB](https://stackoverflow.com/questions/16210863/how-to-recover-from-error-during-bulk-insert-in-mongodb) – Ecstasy Dec 31 '21 at 05:03
  • I'm experiencing the same problem. I want to migrate data from MongoDB to CosmosDB, I have a large collection (33+ million documents) that consistently fails to restore at the same point (53%) with a bunch of "Error 13". Suggestions from @Ecstasy don't apply: - It's not an actual permission error as it happens in the middle of the restore - I want to use mongorestore, not do a bulk insert. Did you come up with a solution? – Olivier Gérardin Jun 01 '23 at 07:58

0 Answers0