Skip to content

Understanding the Archive folder

Overview

Folders selected for synchronization have a hidden .sync/Archive` directory. This directory stores old versions of updated or deleted files: when an Agent updates a file, other Agents move their local copies to the Archive. The Archive can be a useful source for restoring unintentionally deleted or modified files.

The archive's behavior is configured in the Agent's Profile:

  • Use Archive - Enables or disables the archival feature entirely. In Resilio Active Everywhere versions prior to 2.12, this setting applies only to newly created sync Jobs and has no effect on existing ones.

  • Max Archive File Size (MB) - Defines the maximum size of a file whose previous versions will be stored in the Archive. If you frequently work with large files and need version history, consider increasing this value. Note that doing so will require significantly more storage space.

  • Max Archive File Age (days) - Specifies how long files remain in the Archive before being automatically deleted. A longer retention period ensures file versions are available for longer but consumes more storage. If storage is limited, reducing this value is recommended. You can also manually clear the Archive if immediate cleanup is needed.

    Note

    • In Resilio Active Everywhere 3.6.0 and newer, this parameter can also be set by adding the sync_trash_ttl custom parameter to a Job Profile, allowing it to be applied selectively to specific Jobs.
    • On Android devices, archived files are retained for 1 day only, and this setting cannot be modified.

Info

Files remaining in the Archive from previous Job instances (e.g., after recreating or restarting a Job using the same directories) are not automatically cleared. Only files archived during the current Job execution are subject to automatic cleanup based on the configured age setting.

It is recommended to restart the Agent service whenever you change any of the archive-related parameters to ensure the changes are applied correctly.

The Archive Folder's purge operation is triggered by the Agent or Job periodic scan option in the Agent or Job profile.

Archive role in processing file renames and file deletions

From the system's perspective, renaming a file is treated as a two-step process: the old file is deleted, and a new file is created. The file hash remains unchanged. When a file is renamed, other agents handle the operation by moving the old file to the Archive. Instead of re- downloading the renamed file, the agents retrieve it from the Archive, saving both time and network bandwidth. For more information about how renames are handled, refer to the detailed documentation here.

When a file is deleted , other agents will move the file from the syncing folder to their Archive. A file is considered deleted when it is no longer present in its original location on the agent.

The file is not moved to the Archive on the Agent that initiated the deletion.

115001825850

Archive in Synchronization, Hybrid Work and File Caching Jobs

In Synchronization, Hybrid Work or File Caching Jobs, all participating Agents create the .sync directory. An Agent detects file updates either through system notifications or during a periodic folder scan.

When a change is detected, the Agent rechecks the file and, if it has read-write permission in the Job, uploads the new version to other Agents. Those Agents move their current file to the Archive and download the updated version.

Important

The Agent where the file was locally updated does not store the older file’s version.

115001812824

Archive in Distribution and Consolidation jobs

In Distribution and Consolidation Jobs, only destination Agents create the .sync directory. Since transfer jobs are not continuously syncing (but rather one-time transfers), the Archive on destination Agents behaves differently:

  • Files updated on the source Agent are archived on destination Agents only during the next Job run.
  • If the Delete files absent on source agent (Transfer jobs) option is enabled in the Agent Profile, deleted files are not placed in the Archive of destination Agents.
  • If a file is renamed on the source, it is re-synced to destination Agents on the next Job run. File renames are not processed through the Archive.

Restoring files from Archive

To access the Archive:

  • Linux

    Enable hidden items in the file browser and navigate to the .sync directory.

    Archive Linux

  • Windows and macOS (Agent UI)

    Right-click on the Job in the Agent UI and select Open Archive (applicable to Synchronization, File Caching and Jobs, only for macOS and Windows non-cloud Agents).

    Archive Agent Ui

When files are added to the Archive, their modified timestamp reflects the time they were placed there.

If the Archive already contains a file with the same name, the new version receives an (i) suffix, incremented by 1. This metadata helps identify which file version should be restored.

Resilio Active Everywhere does not support automatic file restoration. Files must be manually moved or copied from the Archive back to their original location. Remove the (i) suffix or rename the file as needed.

Important

An Agent must be running when you restore a file from the Archive. The restored file has a modified timestamp older than that on other Agents. If the Agent is running during the restore operation, it detects the change and uploads the file to others. If it is not running, the restore will fail-the file will be overwritten by the version with the more recent modified timestamp.