How to disable snapshot in Azure Storage? - azure

Snapshots cause a lot of cost. In some of my storage accounts I don't need them.
But I can't find a place where I can turn it off.
How can I disable snapshots completely from a storage account in Azure?

It's not a feature that can be turned off completely; Although to make snapshots you would have to explicitly write code to create them, unless you have soft delete enabled. In that case an overwrite will create a snapshot in deleted state but it'll be automatically removed once the soft delete time expires.
Another option would be the lifecycle management. There you can make a rule to automatically delete snapshots once they are more than X days old. That check runs daily so the storage costs are only extended by a few days.

Navigate to your storage account's blob and look for your snapshots under Snapshots. From there, you may manage them.
https://i.imgur.com/P2LRras.png
If you've already established a resource for it, go to that resource's page and delete it.
https://i.imgur.com/qLvFe3v.png

Related

Azure Operational Backup for Azure Blobs different from soft delete?

I have enabled soft delete for blobs, containers as well as point in time restore on my storage account. If I delete my blobs, container or even the entire storage account, it can still be restored it seems. So what does the new Operational Backup for Azure Blobs actually add?
https://learn.microsoft.com/en-us/azure/backup/blob-backup-overview
https://learn.microsoft.com/en-us/azure/storage/blobs/soft-delete-blob-overview
Soft delete protection is limited than Operational back up and has to enable additional settings in
order for additional protection.
But it is useful when only individual blobs are to be protected
instead of storage account level protection.
As You can use blob soft delete only to restore an individual blob,
snapshot, directory (in a hierarchical namespace) or version. To
restore a container and its contents, container soft delete must also
be enabled for the storage account.
Operational backup is configured and managed at the storage account level, and applies to all block blobs within the storage
account and uses a backup policy and can select to store multiple
storage accounts at a time or Select containers or Selected prefix
matches to restore a subset of blobs.
It does the Continuous back up instead of x no of back ups i.e;
you don’t need to schedule any backups and is stored within the
storage account local back up.
Operational backup prevents the blobs from deleting and overwriting as it enforces delete locks on protected blobs and also backs up even if it is not deleted where as soft delete doesn’t stop from deletion but the blobs deleted can be restored and retained it till a period of time .
Data loss is less in Operational back up as Blob point-in-time restore allows restoring blob data to an earlier state. This, in turn, uses soft delete, change feed and blob versioning to retain data for the **specified duration**.
Blob soft delete The clock starts on the retention period as soon as an object is deleted or overwritten .So you can restore a soft-deleted object to its state only at the time it was deleted.
Soft delete does not afford overwrite protection for blobs in the
archive tier. Versioning is not supported for accounts that have a
hierarchical namespace.
For the blobs whose operational back up is enabled and has already soft delete enabled has its back up for extra 5 days if retention policy of op backup is less than soft delete time.Else it will remain unchanged.
Soft delete allows to undelete the blob before restore time after it is deleted or overwritten. Where as operational back up doesn’t allow deletion itself and monitoring is possible with central back up store management.
Note: Operational backup supports operations on block blobs only and
operations on containers can’t be restored. If you delete a container
from the storage account by calling the Delete Container operation,
that container can’t be restored with a restore operation. It’s
suggested you enable soft delete to enhance data protection and
recovery.
So soft delete can be used for minor protection for blob level with selective versioning changes and additional container protection where as operational backup is all together in single pack with extra protection which restores the version ,overwrites or deletion at whatever time you set it .

Azure ZRS/GRS vs snapshots

Why would I need to create a blob snapshot and incur additional cost if Azure already provides GRS(Geo redundant storage) or ZRS (Zone redundant storage)?
Redundancy (ZRS/GRS/RAGRS) provides means to achieve high availability of your resources (blobs in your scenario). By enabling redundancy you are ensuring that a copy of your blob is available in another region/zone in case primary region/zone is not available. It also ensures against data corruption of the primary blob.
When you take a snapshot of your blob, a readonly copy of that blob in its current state is created and stored. If needed, you can restore a blob from a snapshot. This scenario is well suited if you want to store different versions of the same blob.
However, please keep in mind that neither redundancy nor snapshot is backup because if you delete base blob, all the snapshots associated with that blob are deleted and all the copies of that blob available in other zones/regions are deleted as well.
I guess you need to understand the difference between Backup and Redundancy.
Backups make sure if something is lost, corrupted or stolen, that a copy of the data is available at your disposal.
Redundancy makes sure that if something fails—your computer fails, a drive gets fried, or a server freezes and you are able to work regardless of the problem. Redundancy means that all your changes are replicated to another location. In case of a failover, your slave can theoretically function as a master and serve the (hopefully) latest state of your file system.
You could also turn soft delete on. That would keep a copy of every blob for every change made to it, even if someone deletes it. Then you set the retention period for those blobs so they would be automatically removed after some period of time.
https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blob-soft-delete

Migrate production "classic" Azure Storage account to ARM

I'm aware I can now do this through the portal in the storage blade however the account I need to migrate is a production account. It's just blobs, tables and queues, no VMs.
I can stomach some downtime (say an hour or 2) but am unsure how long it would take to migrate approx 750GB, does anyone have experience with the migration and an idea on the time it takes based on a similar volume size?
I also assume once migrated all my storage keys will change so I will need to update all the references in my app settings.
For anyone else wondering about this what #4c74356b41 said appears to be true.
Thanks to this post and the PowerShell command, couldn't get the ARM template to dpeloy at least not from VS, I was able to create a classic storage account. Didn't think this was still possible!
I then kicked off a 50k files container copy from another storage account in the Azure Storage Explorer container into this new classic resource and then while that was running ran the full migration including commit and the file copy carried on regardless.
Final step was to move the new resource (file copy is still ongoing at this point) from the migrated resource group back into the same resource group as the original classic storage account.
Once the move was complete the file copy was still going smoothly and all the Keys remained unchanged so this does seem to be truly seamless.

Azure blob storage backup

I wonder is there's an inbuilt way in azure to backup a blob account, or just a container if that can't be done. Looked into azure backup service but can't find the option for doing it, just options to backup VM.
Alternatively I can write my custom back up strategy, but not sure if it's the case that I can't find that option inbuilt.
Thanks,
There is no blob backup facility. You'll need to make your own backups (e.g. making copies of blobs, either to the same storage account or a different one). You can take snapshots, but as #Gaurav points out in comments, snapshots are tied to the original blob, so if you delete the original, you delete the snapshots.
I answered a similar question regarding backups and Table Storage, as well, here.

Restore files in geo redundant Azure Blob Storage

We have an Azure Blob storage account which is geo redundant. For a reason we can't explain some files have been deleted over the night, we suspect an issue with the file provider we are using (This is an Umbraco application using https://github.com/idseefeld/UmbracoAzureBlobStorage).
We updated the package to the latest version and we hope it does not happen again. However, is it possible to retrieve the files from a secondary location, is there any snapshots?
However, is it possible to retrieve the files from a secondary
location, is there any snapshots?
If the file is deleted from the primary location, in the next geo-replication cycle it will be removed from secondary location as well. So I don't think you will be able to recover the files from secondary location. You may find this blog post useful: https://www.simple-talk.com/cloud/cloud-data/cloud-storage-replication-is-not-backup/.
One possible solution would be to reach out to Azure support and ask them if they can restore the deleted files for you. Typically if you reach out to them soon after the accidental deletes, they would be able to restore the files for you.

Resources