There is no way to recover your data, and there is no way to prevent this. This is by design.
Whenever your computer crashes or the system is updated, it is completely wiped off. A new system image will be copied, the machine will boot again, and your application will be copied. Azure Cloud Services is a platform as a service (PaaS).
This gives you two possibilities. The first would not be to store persistent data in a cloud service in the first way. This is not suitable for Azure Cloud Services. Instead, save your data in an Azure Storage or Azure SQL database (or anywhere).
Another option is to use a virtual machine instead of a cloud service. This car is completely in your hands. It is your responsibility to update it, keep it safe and do everything possible to make it work. With this approach, you also need to take care of the balancer, several instances, etc., Therefore, scaling becomes much more difficult. This is infrastructure as a service (IaaS).
So, it really depends on what you want to do.
source share