The Azure instance change code returns


I'm new to Azure, I have a small instance of cloud service. During a week, my instance is modified twice and all my project data are lost, they will recur at 1 month. All of my client's data is lost, is there any way to recover this data and why this problem occurs.

The answer

There is no way to recover your data and there is no way to prevent this from happening. It's by design.

Every time your machine crashes or there is a system update, it is completely erased. A new system image will be copied, the machine will restart and your application will be copied. Cloud Azure services are Platform-as-a-Service (PaaS).

This leaves you two possible options. The first would be to not save the persistent data on the cloud service first. This is not a good way for Azure Cloud Services. Instead, place your data in the Azure Storage or Azure SQL database (or, if applicable).

Another option would be to use a virtual machine instead of a cloud service. This machine is completely in your hand. It is your duty to update it, keep it safe and do whatever it takes to make it work. With this approach, you also need to take care of a loadbalancer, multiple instances, etc., so that outsourcing becomes much more difficult. This is Infrastructure-as-a-Service (IaaS).

So it depends on what you want to do.