Resilio Connect Agents synchronize all file changes including the state "deleted".
Agents don't delete files
It's important to understand that the Resilio Agent itself is technically not capable of making a decision to delete a file from the storage. But it can, during a folder scan, discover that a file is no longer present in its location or be notified by the operating system about file deletions. In this case, the Resilio Agents with Read-Write access in a job will propagate this file deletion to others.Despite the fact that a number of validations are implemented in the Resilio Agent code in order to ensure that the file is indeed deleted and avoid false-positive occurrences, there could still be some cases when this is a valid file deletion for the Resilio Agent. To undo those deletions will require manually restoring files from the Archive. Here are some of those examples:
1) Renaming files and subfolders
From a technical point of view, a rename is seen by the Agent as deleting a file with the old name and creating a new file with a new name on the file storage. File content and its hash remain the same. Renames are processed through the Archive where an Agent first places a file and then restores it without re-downloading over the network. For this to be possible, the job Archive must be enabled.
2) Ungraceful ejection or disconnecting of an attached storage
While the Resilio Agent is in any way working with files - is scanning them, uploading, or downloading. The operating system does not immediately inform the application that the storage is no longer available and until this happens some files may be considered deleted as they are no longer visible to the Resilio Agent on disk. The Resilio Agent has built-in validation to avoid this in some, but not all possible cases.
3) A very specific case of editing a job
In a job, all Agents know on which of them the file was edited last. This file version is a reference file version that all other Agents are trying to receive. Even though an owning Agent may be already removed from the job, the others still know that the latest file version was made there and will be trying to receive it, until the file is updated somewhere else. Therefore the following steps may lead to propagated file deletion:
- files are updated on a Resilio Agent and they are synced up with others in a job
- this Resilio Agent is removed from the job and after that files are removed from the folder on this Resilio Agent's storage. Nothing is done to the files on other Agents.
- the Resilio Agent is added back to the same job again.
In this case, the Resilio Agent will check the files and since this is the latest file update, deleted files will be propagated to others.
4) Changing folder path in the job for a Resilio Agent
Similar to case 3, but instead of removing the owning Resilio Agent from the job, its path in the job is changed. The Resilio Agent will switch to the new directory and will sync the files there: propagate file deletions or file updates to other agents.
5) Renaming a file/folder on Windows Agents- changing only letter case. Creating a job with files/folders of different letter case on different Agents
It is critical if all the Agents are on Windows OS and if parameter Resolve filename system conflicts is False in the Agents' Profiles. The problem also comes from the way renames are process - through deleting and creating the file. The fact that file TEST.txt and Test.txt are considered the same by Windows, the renamed file is not recreated but instead is considered as deleted.
If you know that changing files' and folders' is a frequent action in your setup, keep Resolve filename system conflicts enabled in the Agent Profile.