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.
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.
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:
Follow the output instruction, where you browse to
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.
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):
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.
The post Backup your Azure Storage Accounts appeared first on CloudOasis.
Original Article: https://cloudoasis.com.au/2019/03/10/backup-your-azure-storage-accounts/