Two simple scripts to backup and restore CosmosDB

At my current company, we use Azure to manage our cloud infrastructure and they provide a lot of great resources and cloud solutions. However, creating a backup from a MongoDB based CosmosDB instance isn't very straight forward (if it is I missed it and please tell me where to look :). If you have a SQL instance easy peasy just go the export tab within in the DB, set a destination, provide login credentials and boom done. NoSql not so much. This is a quick and simple post on the two commands you can run to grab the data from your remote CosmosDB instance (running mongo) and then restore it to another/new CosmosDB instance The problem We needed to quickly…