Backup / Restore Data to / from Azure Cosmos Database with Mongo DB API

Azure Cosmos Database (formerly known as Azure DocumentDB) is a PaaS offering from Microsoft Azure. As a document store, it falls into the same category as MongoDB, CouchDB or RethinkDB and other No SQL DBs and just like those, it handles documents in the JSON format.

Azure Cosmos DB automatically takes backups of all your data at regular intervals.  These automated backups are currently taken approximately every four hours and latest 2 backups are stored at all times. If the data is accidentally dropped or corrupted, you can contact Azure support within eight hours.

Now what happens if you figure out after 8 hours that your data is lost or if its corrupted in your development / staging environments or something accidentally went wrong with production while everyone was on holidays. Continue reading “Backup / Restore Data to / from Azure Cosmos Database with Mongo DB API”