Azure File Sync: Replacing Existing Server Endpoints
Published Sep 25 2020 12:00 AM 10.4K Views
Microsoft

 

Introduction

This is Andrew Coughlin and I am a Customer Engineer at Microsoft focusing on Azure IaaS.  In this blog I will focus on how to add an additional server to an Azure File Sync and how to remove the old server. This process should be followed if you are looking to retire your old Azure File Sync server and want to replace it with a newer server.  However, if you are currently having issues with your Azure File Sync Server this blog is not for your scenario.  If you are having issues with your sync server it is best to open a support request and work with an engineer to solve the problem.

 

Prerequisites

  • Existing Azure File Sync Service setup and configured.
  • Deploy a new Windows Server.
  • Download the Azure File Sync Agent here.
  • Prepare your Windows Server to use Azure File Sync as documented here.

 

Install the Azure File Sync Agent

To install the Azure File Sync Agent, you will go to the location where you downloaded the executable. 

NOTE: Each version of Windows Server has its own version of the installation executable.

  1. Then you will execute the installer. 
  2. Click Next, on the welcome setup wizard.
  3. Accept the terms and conditions and click Next.
  4. Click Next, on Feature Selection.
  5. Set your proxy settings if required, click Next.
  6. Check the checkbox next to Automatically update when a new version becomes available, then select the day and time, then click Install.
  7. Wait for the installation to finish.
  8. Click Finish.

 

Install AFS Agent.gif


Register it to the Storage Sync Service

Once you have installed the Azure Sync Service, you need to register your server with the service.  To do this you will do the following on the new server:

  1. Click OK, on the Azure File Sync - Agent Update
  2. Click Sign In.
  3. You will be prompted for your global administrator username / password.
  4. You will then select the subscription, resource group and storage sync service, then click Register.
  5. Network connectivity test will show green, you may need to click retest.
  6. Click Close once done.

 

Register AF Agent.gif

 

Add the Server Endpoint

Currently we have installed the agent and registered the new server with the Azure File Sync Service.  Next, we will add the new server endpoint to our existing Sync group.  We will go to the portal and search for Storage Sync Service.

 

AndrewCoughlin_2-1600952754726.png

 

Then you will click on the Storage Sync Service you are going to add this new server to.

 

AndrewCoughlin_3-1600952754729.png

 

Click on Overview and then click on your sync group.

 

AndrewCoughlin_4-1600952754731.png

 

Click on the old Server endpoint.

 

AndrewCoughlin_5-1600952754733.png

 

Take note of your current tiering policies for volume policy and date policy.

 

AndrewCoughlin_6-1600952754738.png

 

Click on the X on the Server Endpoint Properties Window.

Click Add server endpoint.

 

AndrewCoughlin_7-1600952754740.png

 

On the Add server endpoint screen, select the server from the dropdown list on Registered Server, and type the path to be synced as part of the sync group. (Example: E:\Shares)

 

AndrewCoughlin_8-1600952754743.png

 

If your current server endpoint is doing cloud tiering, enable Cloud Tiering and configure the new server endpoint to match the old server endpoint configuration, then click Create.

 

AndrewCoughlin_9-1600952754747.png

 

You will now see 2 server endpoints, and the new one you just added will be in a pending status.

 

AndrewCoughlin_10-1600952754748.png

 

When the setup is complete the new server should show healthy:

 

AndrewCoughlin_11-1600952754750.png

 

If you switch to the new server, you will see new files being populated:

 

AndrewCoughlin_12-1600952754754.png

 

We now have our new server added and part of the sync group.  As files are created on the old server, they are synced to the file share and back to the second file server. 

 

Verify Sync on new Azure File Sync Server

Next you need to verify that the new server has completed a sync.  To do this we will open eventvwr on the new server.

 

Then navigate to Applications and Services Logs \ Microsoft \ FileSync \ Agent \ Telemetry.  We want to filter on Event ID 9102, this is logged once a sync has completed.  For additional information around this event id you can visit this page.

 

AndrewCoughlin_13-1600952754761.png

 

Next thing to do is to create the shares. This is one article that explains how to export / import share permissions.

 

Remove Server Endpoint

WARNING: Before completing this next step make sure synchronization, as noted in ‘Verify Sync on new Azure File Sync Server’, has completed and no client devices are no longer talking to this server.  Don’t complete these steps until all clients are talking to the new server. There are several ways you can move your client devices:

  • Add the server to the existing DFS target folder, see my blog here for more information.
  • Shutdown the old server, rename the new server to the old server name, be advised the server endpoint in the portal doesn’t update the name as noted here.
  • Create a CNAME from the old server to the new server, for documentation for creating a cname use this link.

 

Normally when you remove a server endpoint you may only have 1 server in the sync group.  Before you do this, you would make sure to recall those files.  In this scenario, we have 2 servers in the sync group and therefore we do not need to recall the files.  However if you are retiring an Azure File Sync server that you want to keep the files locally on the file server you will want to recall the files before proceeding as documented here.

 

Go back to the Azure Portal, then the Storage Sync Service and the Sync Group. Click on the old sync server and click Delete.

 

AndrewCoughlin_14-1600952754762.png

 

Type the name of the server in the text box and click Delete.

 

AndrewCoughlin_15-1600952754767.png

 

 

AndrewCoughlin_16-1600952754768.png

 

Remove Registered Server

The second to the last step is unregistering the server from the Azure File Sync Service.  To do this go back to the Azure Portal, then the Storage Sync Service.  Click Registered Servers and click on the server you are wanting to retire.  Next, we will click on Unregister Server.

 

AndrewCoughlin_17-1600952754774.png

 

Type the name of the server in the text box and click Unregister.

 

AndrewCoughlin_18-1600952754779.png

 

 

AndrewCoughlin_19-1600952754781.png

 

Uninstall the Azure File Sync agent

The last step is an optional task, since we removed the server from the sync group and unregistered it, those are the more important tasks.  If you would like to uninstall the agent, it is 4 simple steps as outlined below:

 

  1. Click Start > Control Panel > Add/Remove Programs (Programs and Features).
  2. Click on Storage Sync Agent > Click Uninstall.

AndrewCoughlin_20-1600952754782.png

 

  1. Click Yes, on Are you sure you want to uninstall Storage Sync Agent.
  2. Click Yes to restart now, or No to restart later.

 

Conclusion

In 6-7 easy steps, we replaced an old Windows Server running Azure File Sync with a new Windows Server. Are you a Premier or Unified customer? If so and you are wanting to know more about Azure File Sync, ask your CSAM about the Activate Azure with Azure File offering.  Thank you for taking the time to read this blog, I hope this helps you and see you next time.

 

3 Comments
Microsoft

Thanks for the useful information share

Copper Contributor

Do you have any advice on switching the endpoint on the same server?  I needed to add another drive and want to move my shared folder to the new drive.

Microsoft

@lminniear Yes it is possible to do this, I'm currently working on a blog post that discusses the steps on how to complete this.  The blog posted today: at https://techcommunity.microsoft.com/t5/core-infrastructure-and-security/azure-file-sync-switching-se...

Version history
Last update:
‎Sep 25 2020 08:21 AM
Updated by: