Last Update: Sep 04, 2024 | Published: Aug 20, 2018
In this post, Aidan will show you how to deploy Azure File Sync to synchronize files from a file server to Azure, which you can then use to enable tiering of hot/cold files, inter-site replication, cloud-based backup. and disaster recovery.
In this demo lab, I have a file server which will synchronize 3 folders called Accounting, Sales, and Marketing. The destination will be a storage account in the West Europe region of Azure (Netherlands).
The file sync agent will require the AzureRM (ARM) PowerShell modules to be installed first. You can retrieve the latest version of the released MSI installer from GitHub. Note that a new installation of the modules will require a reboot of the file server – this will probably require a maintenance window.
Create a general purpose (v1 or v2) storage account in the region that you want to synchronize to. Note that this storage account should be in a close Azure region (latency) to the file server – this will minimize the impact of tiering (if enabled later) or disaster recovery.
In the storage account, you should create an Azure Files share for each sync group that you require:
Note that leaving quota blank will use the maximum limit of 5 TiB.
I have created three shares, one for each folder that has a large amount of data each.
The next step is to deploy the Storage Sync service in Azure. Open the Azure Portal and deploy Azure File Sync – this will launch the Deploy Storage Sync blade. Give the storage sync service a name, and choose a resource group and Azure region to deploy it into.
The storage sync service will only take a few seconds to deploy in Azure. Once ready, open the storage sync service and browse to Registered Servers. Click the link to download the Azure File Sync agent, and download/copy the installer to your file server.
Note that there is a version for Windows Server 2012 R2 and Windows Server 2016 – older versions of Windows Server are not supported.
Run the installer on the file server – it’s a pretty typical & simple Microsoft installer. Note that you can configure the agent to communicate with Azure through a proxy server.
The registration wizard will automatically launch but you can also start it manually – C:Program FilesAzureStorageSyncAgentServerRegistration.exe.
Unlike with Azure Site Recovery or Azure Backup, you will register the agent using a username/password rather instead of using a downloaded credentials file. How this will work depends on if your subscription has been acquired through the Cloud Solutions Provider (CSP) channel or not.
You will be prompted to sign into your Azure subscription. There is a toggle that you must select if you are using a CSP channel subscription.
The next screen will ask you to select:
Then you will click register … and be requested to sign in a second time. And then your file server will appear in the storage sync service in Azure, and you can start to synchronize folders to your storage account.
I will create one sync group for each shared folder on my file server, and each will synchronize to a cloud endpoint (Azure Files share).
Browse to Sync Groups in the storage sync service and click + Sync Group. In the Sync Group balde:
Wait for the sync group to be created and then open it. Note that we haven’t added a folder/share from the file server (server endpoint) to the sync group yet – we have only added the cloud replication target (cloud endpoint). Now click Add Server Endpoint. Enter the following information:
Note that you can synchronize this folder/share between multiple file servers by adding many server endpoints – I’ll also cover this in another later article.
The Health state of the server endpoint will switch between Provisioning, Pending, and Healthy while the configuration in deployed and content is synchronized for the first time.
Eventually you should find that the share in the storage account will be populated with all the files from the file server. The synchronized cloud copy of the folder should now be considered the master copy, and the file server should be considered as a local proxy of the share(s).
You can repeat these steps for each sync group that you need to create.