Working with mission-critical data - Azure Files and Azure Blobs
Tags: critical, data, azure, blobs
Published: 2024-05-24 08:51:48

## Create a storage account with high availability.
In the portal, **search** for and select _Storage accounts_.
![Search](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iff09bctz8oov333b993.png)
**Select + Create**.
![Select & Create](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2ztbrz61uypjwyeiwjbh.png)
For _resource group_ **select** new. **Give** your _resource group_ a **name** and select OK.
**Set** the _Storage account name_ to _publicwebsite_. Make sure the storage account name is unique by adding an identifier.
![resource group name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/40emmbsg2nb0lpqvkgls.png)
**Select** _Review_ and then _Create_.
![create](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8pc9iwwd0ep7547r37aa.png)
Take the defaults for other settings.
![Deployment](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1qsf77qgg5qpvmuf526j.png)

In the storage account, in the **Data management section**, **select** the **Redundancy blade**.
**Ensure** _Read-access Geo-redundant storage_ is **selected**.
_Review the primary and secondary location information.

![Read-access Geo-redundant storage](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u0caxki41ldn3rp9iwp2.png)

In the storage account, in the **Settings section**, **select** the **Configuration blade**.
**Ensure** the _Allow blob anonymous access setting_ is **Enabled**.
_Be sure to Save your changes._

![Allow blob anonymous access setting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/34ic9ngf1lii5smxkttd.png)

## Create a blob storage container with anonymous read access
In your storage account, in the **Data storage section**, **select** the _Containers blade_.
**Select + Container**.
**Ensure** the _Name of the container_  is _public_.
**Select** _Create_.

![Name of the container](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/sr8yltoezajs6hdco6vd.png)

On the _Overview blade_, **select** _Change access level_.
**Ensure** the _Public access level is Blob (anonymous read access for blobs only)_.
**Select** _OK._

![Public access level is Blob](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/56yig4q18jrcy0pubx7d.png)



## Practice uploading files and testing access.
**Ensure** you are viewing your _container_.
![viewing your container](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p4f5nncc39fytxq3pxwr.png)
**Select** _Upload_.
![Browse files](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/alhiu8g2jdnwsxngh9hm.png)
**Browse** to files and **select** a _file_. Browse to a file of your choice.
**Select** _Upload_.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q9ynvxkwsx39m758zysp.png)
**Close** the upload window, **Refresh** the page and _ensure your file was uploaded_.
![uploaded](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hldjmq9fqfx6o7es9jxy.png)

**Select** your uploaded file.
On the **Overview tab**, **copy** the _URL_.
**Paste** the _URL into a new browser tab_.
![Uploaded file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c79j21covb6qzg1zds5k.png)
If you have uploaded an image file it will display in the browser. Other file types should be downloaded.
![displayed file](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jz77t0eeaz1tclb5rk1d.png)

## Configure soft delete
**Go** to the _Overview blade_ of the _storage account_.
On the _Properties page_, locate the _Blob service section_.
**Select** the _Blob soft delete setting_.
![Blob soft delete setting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t0ysi2992skmzls1h0m3.png)


**Ensure** the _Enable soft delete for blobs_ is _checked_.
**Change** the _Keep deleted blobs_ for (in days setting is **21**)
_Notice you can also Enable soft delete for containers._
![Enable soft delete for blobs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0sdmiuwmw51efkc5py7l.png)
Don’t forget to Save your changes.

**Navigate** to your _container_ where you _uploaded a file_.
**Select** the file you uploaded and then **select** _Delete_.
**Select** _OK_ to confirm deleting the file.
![Select Delete](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gv1cazh7ol9y1l37hc8e.png)

On the **container Overview** page, **toggle** the slider _Show deleted blobs_. _This toggle is to the right of the search box_.
![toggle off](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xumckce724o9lurg0r5v.png)
![toggle on](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4wt0yr4ou5k16wrwfkl3.png)
**Select** _your deleted file, and use the ellipses on the far right, to Undelete the file_.
![undelete](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/68kun0bb0s38r8xrxean.png)
**Refresh** the container and confirm the _file has been restored_.
![restored](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vl4jrkw1kow28rs1oh3a.png)

## Configure blob versioning
**Go** to the _Overview blade_ of the _storage account_.
In the _Properties section_, **locate** the _Blob service section_.
**Select** the _Versioning setting_.
![Versioning setting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mal617ddndw9pk0qa9ju.png)

**Ensure** the _Enable versioning for blobs_ checkbox is _checked_.
_Notice your options to keep all versions or delete versions after_.
![Enable versioning for blobs](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yfabs8en35d83edcesty.png)
Don’t forget to Save your changes.

**Upload** _another version of your container file_. _This overwrites your existing file_.

![Overwrite1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/npaftmkrgro5xigo0fra.png)

![Version1](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/65v4ucn35owyqgvebz2l.png)
![Check Version](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/l50pc3k5m610wsompprx.png)

![Upload2 versions](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nvb02tds03j7r76kbm88.png)








Your previous file version is listed on Show deleted blobs page.