|
| 1 | +--- |
| 2 | +title: Replace an Azure File Sync server |
| 3 | +description: How to replace an Azure File Sync server due to hardware decommissioning or end of support. |
| 4 | +author: khdownie |
| 5 | +ms.service: azure-file-storage |
| 6 | +ms.topic: how-to |
| 7 | +ms.date: 02/27/2024 |
| 8 | +ms.author: kendownie |
| 9 | +--- |
| 10 | + |
| 11 | +# Replace an Azure File Sync server |
| 12 | + |
| 13 | +This article provides guidance on how to replace an Azure File Sync server due to hardware decommissioning or end of support (for example, Windows Server 2012 R2). |
| 14 | + |
| 15 | +## New Azure File Sync server |
| 16 | +1. Deploy a new on-premises server or Azure virtual machine that is running a [supported Windows Server operating system version](file-sync-planning.md#operating-system-requirements). |
| 17 | +2. [Install the latest Azure File Sync agent](file-sync-deployment-guide.md#install-the-azure-file-sync-agent) on the new server, then [register the server](file-sync-deployment-guide.md#register-windows-server-with-storage-sync-service) to the same Storage Sync Service as the server that is being replaced (referred to as old server in this guide). |
| 18 | +3. Create file shares on the new server and verify the share-level permissions match the permissions configured on the old server. |
| 19 | +4. Optional: To reduce the amount of data that needs to be downloaded to the new server from the Azure file share, use Robocopy to copy the files in the cache from the old server to the new server. |
| 20 | + |
| 21 | + ```console |
| 22 | + Robocopy <source> <destination> /COPY:DATSO /MIR /DCOPY:AT /XA:O /B /IT /UNILOG:RobocopyLog.txt |
| 23 | + ``` |
| 24 | + Once the initial copy is completed, run the Robocopy command again to copy any remaining changes. |
| 25 | + |
| 26 | +5. In the Azure portal, navigate to the Storage Sync Service. Go to the sync group which has a server endpoint for the old server and [create a server endpoint](file-sync-server-endpoint-create.md#create-a-server-endpoint) on the new server. Repeat this step for every sync group that has a server endpoint for the old server. |
| 27 | + |
| 28 | + For example, if the old server has 4 server endpoints (four sync groups), 4 server endpoints should be created on the new server. |
| 29 | + |
| 30 | +6. Wait for the namespace download to complete to the new server. To monitor progress, see [How do I monitor the progress of a current sync session?](/troubleshoot/azure/azure-storage/file-sync-troubleshoot-sync-errors?tabs=portal1%2Cazure-portal#how-do-i-monitor-the-progress-of-a-current-sync-session). |
| 31 | + |
| 32 | +## User cut-over |
| 33 | +To redirect user access to the new Azure File Sync server, perform one of the following options: |
| 34 | +- Option #1: Rename the old server to a random name, then rename the new server to the same name as the old server. |
| 35 | +- Option #2: Use [Distributed File Systems Namespaces (DFS-N)](/windows-server/storage/dfs-namespaces/dfs-overview) to redirect users to the new server. |
| 36 | + |
| 37 | +## Old Azure File Sync server |
| 38 | +1. Follow the steps in the [Deprovision or delete your Azure File Sync server endpoint](file-sync-server-endpoint-delete.md#scenario-1-you-intend-to-delete-your-server-endpoint-and-stop-using-your-local-server--vm) documentation to verify that all files have synced to the Azure file share prior to deleting one or more server endpoints on the old server. |
| 39 | +2. Once all server endpoints are deleted on the old server, you can [unregister the server](file-sync-server-registration.md#unregister-the-server). |
0 commit comments