Azure File Sync to Azure File Share migration cleanup conflict files

mpls 135 Reputation points
2024-01-27T20:30:54.1366667+00:00

We are moving several sites from using their old on prem file shares to the Azure File Synced instanced of the same content via Azure File Share. Azure File Sync has been used for Backup but now we are retiring the on prem file server. We are now on the fifth site and came across conflicted files for the first time. We have been waiting a few days to stop sharing the on prem server after redirecting machines to the Azure File Share instance. It bit us at this site where a few on prem machines were able to open the two access db files (via the on prem folder) while it was also opened in Azure File Share. I understand how Azure File Sync names the winning cloud file with -Cloud and the winning on prem with the server's hostname. After the access to on prem was revoked we are good with data. The file with the original name has all changes present. Is there a command we can run to clean up the old conflict files? Are we safe to move them out of the directory where the original file is located? Or is that file now dependant on these "sub files"? I want to avoid an end user opening a -cloud or -conflict file and making changes in them.

Azure Files
Azure Files
An Azure service that offers file shares in the cloud.
1,420 questions
Windows for business Windows Server User experience Other
{count} votes

Accepted answer
  1. Sumarigo-MSFT 47,466 Reputation points Microsoft Employee Moderator
    2024-01-29T07:34:51.93+00:00

    @mpls Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    When Azure File Sync detects a conflict, it renames the conflicting file with a suffix of "-ServerName" for the on-premises file and "-Cloud" for the cloud file. The file with the original name is preserved and contains all changes.

    To clean up the old conflict files, you can safely delete the files with the suffix "-ServerName" or "-Cloud" once you have verified that the original file with the correct changes is present. These files are not dependent on the original file and can be safely removed. However, it is important to ensure that end users do not open the "-ServerName" or "-Cloud" files and make changes to them. This can cause further conflicts and data loss. To avoid this, you can educate your end users on the importance of not opening these files and making changes to them. Additionally, you can set up access controls to restrict access to these files and prevent accidental modifications. File conflicts are created when the file in the Azure file share doesn't match the file in the server endpoint location (size and/or last modified time is different).

    The following scenarios can cause file conflicts:

    • A file is created or modified in an endpoint (for example, Server A). If the same file is modified on a different endpoint before the change on Server A is synced to that endpoint, a conflict file is created.
    • The file existed in the Azure file share and server endpoint location prior to the server endpoint creation. If the file size and/or last modified time is different between the file on the server and Azure file share when the server endpoint is created, a conflict file is created.
    • Sync database was recreated due to corruption or knowledge limit reached. Once the database is recreated, sync enters a mode called reconciliation. If the file size and/or last modified time is different between the file on the server and Azure file share when reconciliation occurs, a conflict file is created.

    Azure File Sync uses a simple conflict-resolution strategy: we keep both changes to files that are changed in two endpoints at the same time. The most recently written change keeps the original file name. The older file (determined by LastWriteTime) has the endpoint name and the conflict number appended to the file name. For server endpoints, the endpoint name is the name of the server. For cloud endpoints, the endpoint name is Cloud. The name follows this taxonomy: <FileNameWithoutExtension>-<endpointName>[-#].<ext> For example, the first conflict of CompanyReport.docx would become CompanyReport-CentralServer.docx if CentralServer is where the older write occurred. The second conflict would be named CompanyReport-CentralServer-1.docx. Azure File Sync supports 100 conflict files per file. Once the maximum number of conflict files is reached, the file will fail to sync until the number of conflict files is less than 100.

    Please let us know if you have any further queries. I’m happy to assist you further.     

    ---Please do not forget to "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.