DEV Community

Baridiilo Poromon
Baridiilo Poromon

Posted on • Updated on

Create a high-availability storage account with public access, a blob container, soft delete, and blob versioning enabled.

To create a storage account with high availability you first have to create a storage account to support the public website. In the Azure portal, search for and select Storage accounts then press create.
Create a new resource group and give it a name. Give a name for the storage account name. Select Review + Create. Once the storage account is deployed press go to resource. In the storage account, navigate to the Data management section, and click on Redundancy. Select Read-access Geo-redundant storage. Review the primary and secondary location information. To ensure that information on the public website is accessible without requiring customers to login select Configuration in the settings section in the storage account. Enable the Allow blob anonymous access setting and save changes. To create a blob storage container with anonymous read access in your storage account, find the Data storage section, and select Containers. Click new container and name your container and press create. To ensure that customers are able to view images without being authenticated select your container.
and in the overview section, select change access level. Public access level should be Blob and press OK. For testing, upload a file to the public container. Any file type works. Click "Upload." Select a file of your choice and upload. Refresh the page, and confirm that your file was uploaded successfully. Open a browser and test the URL given. To restore documents that have been delete configure blob soft delete. To do this, in the overview section of the storage account. Navigate to the properties page, and find the Blob service section. Select the Blob soft delete setting. Check off the Enable soft delete for blobs. Change the Keep deleted blobs for and save. To use soft delete to restore files. Go to your container where you uploaded the file. Select and delete that file. On the container Overview page, toggle the slider to Show deleted blobs. Select the deleted file, and use the ellipses on the far right, to Undelete. Refresh the container and ensure the file has properly been restored. It's essential to maintain a record of the different versions of your website's product documents. Here's how to enable blob versioning: Go to the Overview section of the storage account. and find the Properties section, and then Blob service section. Select the Versioning setting. Check the "Enable versioning for blobs" checkbox. Save the changes. To restore previous blob versions, upload a new version of the container file, which will overwrite the existing file. The previous file version will appear on the Show deleted blobs page.

Top comments (0)