locked
Azure File Sync how to migrate files to another storage account in other subscription and tenant. RRS feed

  • Question

  • Hi everyone! Does anyone has recently faced a situation like this?
    I'm working with a customer that is migrating workloads from a CSP subscription into it´s new  EA subscription.
     The problem is with their file sync, they are having the files duplicated after they the execute procedure below;
    1 - Unresgitred the local server from azure file sync 
    2 - azcopy "storageaccountCSP" to "storageaccountEA"
    3 - Created new file sync service on the EA subscription
    4 - registered the local server on the newly created file sync.
     
    Does anyone have any suggestions? Or workaround?
     
    Thank you,

    rbegito

    Sunday, May 24, 2020 9:11 PM

All replies

  • Firstly, apologies for the delay in responding here and any inconvenience this issue may have caused. 

    Can you please explain what all files have been duplicated?

    Sometime this kind of issue may cause due to Duplicate files in Azure File Sync server endpoint with server endpoint name appended.

    Just for clarification: The storage sync service and/or storage account can be moved to a different resource group or subscription within the existing Azure AD tenant. If the storage account is moved, you need to give the Hybrid File Sync Service access to the storage account (see Ensure Azure File Sync has access to the storage account).

     Note: Azure File Sync does not support moving the subscription to a different Azure AD tenant.

    This would create a conflict between the files on the server and cloud endpoints, resulting in the older files being renamed with this taxonomy: <FileNameWithoutExtension>-<MachineName>[-#].<ext>.  Since all the files were migrated using AzCopy, the result would be a conflict for every file.

    I would recommend migration methods would either be to use the Server Endpoint to upload the files, or use the Offline Data Transfer feature of Azure File Sync when creating the server endpoint.  Both of these would retain the file timestamps.

     Use the Server Endpoint to upload the files

     In this method, instead of copying the data between Azure File Shares using a tool like AzCopy, you could just deprovision the Server Endpoint, then provision that same server into a new Sync Group.  The result is that if the data only existed on the server endpoint and not in the Cloud Endpoint (Azure File Share), it would proceed to upload all the files to the Cloud Endpoint, retaining the timestamps.

     Using Offline Data Transfer Feature

     When provisioning a Server Endpoint in a Sync Group, there is an option to enable Offline Data Transfer.  This is commonly used in conjunction with Azure Databox to migrate on-prem data to Azure, but for this scenario it can be used to migrate data from an Azure File Share to your Azure File Sync server endpoint, and thus the cloud endpoint.  The idea is that you pre-seed data into an Azure File Share which we refer to as a staging share.  Then, when provisioning the server endpoint, you indicate this staging share and the destination share (see screenshot below).  However, there is a limitation with the offline data transfer:

    The resolution here is to either use PowerShell or another script to clean up the duplicates, or to perform the migration again either using Offline Data Transfer or using the server endpoint to upload the files to the new cloud endpoint.

    I would also recommend to contact support when you try to migrate data from one subscription to another subscription. 

    Hope this helps! 

    Kindly let us know if the above helps or you need further assistance on this issue. 
    ------------------------------------------------------------------------------------------
    Do click on "Mark as Answer" and Upvote on the post that helps you, this can be beneficial to other community members.

    Tuesday, May 26, 2020 7:40 AM
  •  Just checking in to see if the above answer helped. If this answers your query, do click “Mark as Answer” and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

    Wednesday, May 27, 2020 8:19 AM
  • Is there any update on the issue?

    If the suggested answer helped for your issue, do click on "Mark as Answer" and “Vote as Helpful” on the post that helps you, this can be beneficial to other community members.

    Thursday, June 4, 2020 3:27 PM