Search This Blog

Wednesday, September 9, 2015

Use Azure Files on Azure Linux Virtual Machine For Backup Purpose

 

On Azure, we cannot use Azure Backup Services to backup linux data. It only supported on Windows VM. Wish it can support Linux Platform next time. But let focus on our option that is available at this moment.

We found the best way is transfer a copy of data from Linux VM to Azure Files. Once smb share has map to Linux VM, we create a cron job to schedule copy a file/backup to smb share.

azurefiles

For our case, we leverage on Azure Files (which can support up to 5TB) and here is our configuration to map smb share to linux virtual machine.

  • Request Azure Files Preview features by clicking link here:- http://azure.microsoft.com/en-us/services/preview/
  • Create a new Azure Storage, with same region as virtual machine. You cannot reuse previous storage account. After activate Azure Files, you only able to see “Files Services.

image

sudo apt-get install cifs-utils

image

  • Create a path to mount and mount it
sudo mkdir –p /media/folder/share

sudo mount –t cifs //azure files path /mount point –o vers=2.1,username=azurestoragename,password=AzureStorageKey

Example:

sudo mount -t cifs //ms4upool1.file.core.windows.net/ms4ushare1 /media/folder/share -o vers=2.1,username=ms4upool1,password=0iTkZnkVKRyUSFY4Fb2cUTUWTRlExE1/KENLAvj7CpSaxZ+ptI6UWjIUL35mzX3LXPNs/6vih/LeRH3q6IBbng==

image

  • Now you have a SMB 2.1 share folder ready.
  • Cron job ready to transfer data to Azure Files.
  • Last step is map the same Azure Files to Windows Virtual Machine (act as staging VM which has installed with Windows Backup Services) so we can proceed to backup data running on Linux virtual machine.

Finally in this post, we have look into how to use Azure Files for storing linux data and use Windows VM as staging server to connect Azure Backup Services to protect our data.