Azure Storage
  • 21 Jun 2024
  • 4 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Azure Storage

  • Dark
    Light
  • PDF

Article summary

Save Documents to Azure Blob Storage

1. Purpose

Azure storage is a cloud storage solution that provides various benefits for data storage and management. Azure storage allows users to store attachments in the cloud, which reduces the load on the database and improves performance. Azure storage also offers backup and encryption features, which ensure data security and durability.

2. Setup Azure Storage account

To use Azure Storage functionality storage account must be created in Azure Portal. (https://portal.azure.com/). In the main page select Storage Accounts.
image.png
Picture 1. Azure Portal main page
Then select “Create” action to create a new storage account.
image.png
Picture 2. Create new storage account
In the new window:
1.Select your subscription.
2.Create or select an existing resource group.
3.Create storage account name.
4.Select a region that fits your location.
5.Select Performance option, for most scenarios Standard option is recommended.
6.Select Redundancy option that fits your data protection requirements.

image.png
Picture 3. General settings

After general settings are done, navigate to Data protection tab and change settings if necessary. Data protection lets you recover files that you have deleted within a specified time frame. Enable or disable this option as needed.

image.png
Picture 4. Data protection requirements

To change encryption requirements, navigate to Encryption tab. Customer can allow Microsoft to manage encryption by selecting standard option “Microsoft-managed keys” or choose to use their own keys by selecting “Customer-managed keys”. Field “Enable infrastructure encryption” adds another layer of encryption to the files stored in Azure Storage. After storage account setup is done, use Review action to get summarized information about the account.
image.png
Picture 5. Data encryption requirements

If the information is correct, use Create action to create storage account. This process will take a few minutes.
image.png
Picture 6. Summary

After storage account is created, navigate to resource by using “Go to resource” action or it can be found in the Storage Accounts list in the main page.
image.png
Picture 7. Storage account overview

3. Setup Azure Storage in BC

After storage account is created, navigate to BC and find Azure Storage Account Setup page.
image.png
Picture 8. Azure Storage Account Setup

To fill in the information required for the setup, go to azure storage account and find Access Key tab.
image.png
Picture 9. Access Keys tab in Azure Storage account

Copy „Storage account name“ field by using Copy action and paste in to BC „Account Name“ field in Azure Storage Account Setup page. Then use Show action in azure storage on key1 „Key“ field to see Shared Access Key, copy the key and paste it into BC „Shared Access Key“ field.
image.png
Picture 10. Required information for Azure Storage Account Setup

When Azure Storage Account Setup is completed, use action Test Connection to Azure to test if credentials and connection are working.
image.png
Picture 11. Test connection

You can use Azure Storage to store your attachments in the cloud after creating a storage account and testing your credentials and connection. To enable this feature, go to the SOFT4 Setup page and look for the field „Documents Storage Location“. The default value is „Local Database“, which means your attachments are saved in your database. If you choose „Azure Storage“ instead, your attachments will be transferred from your database to your Azure Storage account and deleted from your database. The action will also show the approximate time that it will take to move all the attachments, make sure you are not creating any new attachments in the system in the meantime. You can switch back to Local Database anytime and it will revert the process by downloading all the files from Azure Storage, deleting files from Azure Portal and storing them in your database once again.
image.png
Picture 12. Soft4 Setup

After the transfer is complete, verify that the files were moved to the Azure Storage correctly. Go to Azure Portal, find storage account and go to Containers tab. Every object container (i.e. Contact, Contract, Asset) will have a prefix and it’s number, so files are separated and can be easily found in the list or by using Seach feature.
image.png
Picture 13. Files in Azure Storage containers

Inside the container of each object there will be a list of files that belong to that object in Business Central. File name will contain document number that it belongs to and a file name. Most of the files can be previewed by clicking on it and selecting Edit tab on the right side, some file types like .PDF will have to be downloaded to preview.
image.png
Picture 14. File preview

4. Ending Notes

Once you switch to Azure Storage, you can continue to manage your files in Business Central as usual. You can upload, download, and delete files as you need, and Azure Storage will take care of the rest. Azure Storage offers many benefits, such as scalability, security, and reliability. You can also access your files from anywhere, anytime, using any device.


Was this article helpful?