Tidy up - Unused Project and Nuget package reference using Visual Studio 2019

If you are a Developer/Architect using Visual Studio as IDE for your development activities, this blog post will be of your interest. During the Ignite 2021 conference, Microsoft released Visual Studio 2019 v16.9 and v16.10 Preview 1. As part of version 16.10 Preview 1, one of the cool features they introduced is to "Remove Unused References..." for any Projects and Nuget packages that are not in use. At the time of writing this blog post, we have Visual Studio Version 16.10.0 (official release) which includes this new feature.  As part of development, we generally get carried away and introduce new Nuget package references to your project and add new references to your Projects. By the end of development, you will not be 100% sure which are not being referenced and unused which means you will leave those unused project references in your application. Now you might be wondering what's the big deal in it since it doesn't harm. The advantage of removing unused project r

Azure Cosmos DB Continuous backup with point in time restore

In Microsoft Ignite (March) 2021 there were several new announcements made by different product teams (e.g. Data, AI, etc.) within Azure. As part of today's blog post, I am going to cover one such announcement made by the CosmosDB team - Continuous backup with the point in time restore capability which is in public preview now.  

Prior to this new feature announcement now you might be wondering what was the option for CosmosDB backup? Until this new announcement made the option we had was Periodic backup mode where the backup is taken at a periodic interval which will be defined by the end-user. The minimum backup interval can't be less than one hour. Unfortunately, with Periodic back up you can’t access the backup by yourself. You’d need to raise a support request/ticket with the Microsoft team, who would then perform the backup for you. Another option was implementing custom implementation by yourself which comes with Time, Cost, and Effort. 

By using Continuous backup, you can easily backup and restore your databases as a true PaaS offering similar to Azure SQL. Right now point in time restore option is available only for SQL API and Mongo API. Just like periodic backups, these backups are performed without affecting the performance of your database and without consuming any extra provisioned throughput (RUs).

Few things to be known with the Point in time restore feature:

  • The restore window is only 30 days for a given container or database and you don't have an option to modify it.
  • Continuous Backup is available only for new accounts. This means if you already have an existing CosmosDB you can't make use of this new feature.
  • Azure Cosmos DB stores these backups in Azure Blob storage in the respective regions
  • Azure sovereign and Azure Government cloud regions are not supporting this new feature.
  • Multi-regions write accounts are not supported.
  • The restore process restores all the properties of a container including its TTL configuration. As a result, it is possible that the data restored is deleted immediately. In order to prevent this situation, the restore timestamp must be before the TTL properties were added into the container.
The following configurations aren't restored after the point-in-time recovery:
  • Firewall, VNET, private endpoint settings.
  • Consistency settings. By default, the account is restored with session consistency.  
  • Regions.
  • Stored procedures, triggers, UDFs.
To know more about the limitations of this public preview feature can be found here. Just like any other Azure Services good to know the pricing for the restore option which can be found here.

Now let's see within Azure Portal where we can see these options.
  • Enable the Continuous backup option while creating a new Azure CosmosDB account.
Enable Continuous Backup option

  • To restore, select a point in time in the past (UTC format) along with the option whether you want to restore the entire account or a database.

Point In Time Restore option

Note: Continuous backup with the point in time restore feature is still in preview so be cautious before implementing it in the production workload. 

Comments

Popular posts from this blog

Tidy up - Unused Project and Nuget package reference using Visual Studio 2019

Swagger UI for Azure Function v2 & v3 APIs

Authenticate Azure Functions - API Keys