Backup your Azure Storage Accounts

By Style Sync
| Published on
67dd3-azure-storage-accounts

How do you backup your Microsoft Azure Storage Accounts? Is there a way to export the unstructured data from your blob storage accounts and then back it up to a different location?

 

Last week I had a discussion with a customer who wanted to backup his Microsoft Azure Storage Accounts, blob, files, tables, and more, and was asking if somehow Veeam Backup Agent could help achieve this.

Straight out of the box, it is challenging to backup the data resident in Azure Storage Accounts; but with a few simple steps, I assisted the customer to backup the Microsoft Azure unstructured blob files to a Veeam Repository using Veeam Backup Agent for Windows.

In this blog post, I will take you through the steps I took to help the customer back up their Microsoft Azure Storage Accounts. The solution is to use Microsoft AzCopy to download and sync the required blob container files to a local drive. The drive is where the Veeam Backup Agent is installed and configured to backup the Virtual Machine, or the targeted folder.

Solution Pre-requisites

As I mentioned before, the steps to achieve the requirements are straightforward and require the following items to be prepared and configured:

  • Veeam Backup Server.
  • Veeam Backup Agent installed on a Microsoft Azure VM.
  • Disk space attached to the VM to temporarily store the blob files.
  • Microsoft Azcopy tool.

AzCopy Tool

To copy data from a Microsoft Azure Storage Account, you must download and install the Microsoft Azcopy tool. You can download it from this link. Install it on the VM where the Veeam Backup Agent is installed.

After it has downloaded, run the setup, and then run from the start menu:

 

By default, the program files are stored in:

C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\

After the process has started, you must configure the access to your Microsoft Azure subscription using this command:

AzCopy login

Follow the output instruction, where you browse to

https://microsoft.com/devicelogin

Enter the generated random access code to authenticate. In this example, it is HP5DFJBZ9; you will get a different code.

 

After following those steps, you finished with the Microsoft AzCopy installation and configuration.

Solution

To begin copying the blob data to the local drive, we must perform the following steps:

  • Create a directory on the local drive where you will store the downloaded blob files.
  • Obtain your Storage Account key.
    • Note: In this screenshot at zcopytesting – Access keys, you are provided with two keys so that you can maintain connections using one key while the other regenerates. You must also update your other Microsoft Azure resources and applications accessing this storage account to use the new keys. Your disk access is not interrupted.

  • Obtain the Blob Container URL:

The next step is to create a .cmd script to apply all those steps above. The script looks like this:

“C:\Program Files (x86)\Microsoft SDKs\Azure\AzCopy\AzCopy” /Source:<Blob Container URL> /Dest:<Local Folder> /SourceKey:<Access Key> /S /Y /XO

This .cmd file can be scheduled to run before your Veeam Backup Agent job or using windows schedule.

Veeam Backup Demonstration

To Validate the solution developed above, I tested it by uploading several files to the blob storage account:

I also started a backup job. After the backup job completed, I ran the restore process to validate using the Restoring Guest Files option:

Restoring and editing the console.txt script before modifying the file:

The second backup was completed after modifying the console.txt file and then starting the incremental backup. The following screenshot is the Restore from Incremental (note the time of the backup):

Edit the console.txt file (added Hal – Test For Incremental x 2):

Conclusion

With these simple and straight forward steps, I have been able to backup my Microsoft Azure storage account to my Veeam Backup Repository. The good news is that the .cmd script I provided for you on this blog post allows copying only the new updated/modified (/xo) files from the blob storage. This will save time and space, both on your Veeam Repository and the local disk. On this blog post, I have provided basic and manual steps to demonstrate the solution and capabilities. As previously mentioned, it is ideal to use the Microsoft Azcopy command before starting the backup job as a pre-run script, or as part of a Windows scheduler.

I hope this blog post will help you; please don’t hesitate to share your feedback.

What do you think?

What do you think?

8 Comments:
June 25, 2020

Is there also a solution to perform restore of certain files/date with veeam? Since the backup is incremental etc.

July 4, 2020

Hi MB,

Sure there is, you can achieve this quickly suing Veeam File Level Restore, by just right click on the backup and choose “Restore guest files.”

July 4, 2020

Thank you, and also to be able to retire versions of the same files with the same file name but selecting various versions of it? Still blob storage.

5 Trackbacks:
April 1, 2019

[…] I hope this blog post will help you; please don’t hesitate to share your feedback. The post Backup your Azure Storage Accounts appeared first on […]

December 13, 2020

[…] 6. Backup your Azure Storage Accounts – CloudOasis […]

[…] 8. Backup your Azure Storage Accounts – CloudOasis […]

[…] 6. Backup your Azure Storage Accounts – CloudOasis […]

[…] 8. Backup your Azure Storage Accounts – CloudOasis […]

Leave a Reply

Your email address will not be published. Required fields are marked *

Subscribe to Our Newsletter

Table of Contents

Related Insights