Skip to content

How Agents process file renames

This article explains how Resilio Active Everywhere Agents work to process the renames of directories and files. For simplicity we'll refer to all renamed items as 'files'.

For any operating system a rename is equivalent to deleting the old_filename and creating a new_filename. The hash of the file remains the same. When one Agent notices a renamed file, other Agents process it through the Archive folder: the old_filename is moved to the Archive folder, however instead of re-downloading the new_filename, they reuse the archived file and move it back to the Job folder with a new name. This allows to process such file system changes much more efficiently and reduce the network traffic.

Agent Profile parameters

Processing file name changes through the Archive folder requires enabling the following Agent Profile parameters:

  • Read file ID from disk in the Disk usage settings section.
  • User archive in the Folders settings section.

There are several scenarios possible, but here is the model file rename processing flow:

  1. File old_filename.txt is renamed to new_filename.txt on Peer A.

    Rename 01

  2. Remote peers detect that the old_filename.txt file is missing on Peer A and move the file to the Archive folder.

    Rename 02

  3. After a while, remote Agents detect that new_filename.txt has been added on Peer A and check if there is a file with the same hash value in the Archive folder.

    Rename 03

  4. If there is such a matching file, Agents move it back to the Job folder with a new name.

    Rename 04


    Rename 04