Starting with Resilio Connect v2.10 Agents support system integrated Selective Sync functionality which is based on special Windows API. It comes to replace the legacy Selective Sync.
It allows to access and download files directly using a file browser or transparently through an application. Some limitations in usage flow apply, see them listed below.
To enable it for an agent put option "Advanced selective sync" to true in Agent profile. Before doing it, it's advisable to remove the agent from the job and add it back after enabling the option.
Don't run two agents with Selective Sync on same computerRunning two agents in Selective Sync mode on same computer is not supported and highly not advisable.
Possbile conflicting with One-DriveConfiguring Agent to sync a One-Drive folder with 'on demand' files won't work - these files won't be uploaded and job won't be completed
Optimal number of files for TSSIt's advisable not to use TSS for folders with more than 10 million files in sum. Performance degradation and synchronization issues will be observed.
Advanced selective sync works only on:
- Windows 10 build 1809 and newer
- Windows Server 2019 build 1809+
Please check for file C:\Windows\System32\cldapi.dll existence as a quick check if your Windows supports the advanced selective sync.
Works for local NTFS, which can be accessed via SMB. It does not work for FAT32 and exFAT file systems.
MANAGING FILES AND PLACEHOLDERS
All files and subfolders are seen in a file manager with the availability attributes and context menu items mentioned below.
File is set to be automatically synced. If this is the status of a subdirectory, all files inside it will be automatically downloaded. If a new file is created in such a subdirectory, it gets this status. Any updates to the files on remote agents will be auto-synced.
Unchecking this state through context menu reverts the file to state. If unchecked for a subfolder, all synced files inside it are also reverted to state.
File version is downloaded to the current device and is available here. It also means that if this file changes on remote agent, it gets cleared off and reverted to a dehydrated file (placeholder). Local file changes will be synced to remote agents. Newly created files in a selective sync subdirectory have this status.
Dehydrated file - file is an empty placeholder and can be downloaded from remote agent. It consumes only 1 KB of storage (filesystem header).
If a dehydrated file is copied (using Explorer or CMD), both - the source file and its copy - are reverted to state
If a dehydrated file is moved to a different directory, using Explorer it will appear in state in new location. If moved using CMD, it will remain dehydrated. Vice versa if renamed (change name).
All files are dehydrated after cleanup timeout.
File is being downloaded and opened in an application. Cancelling download depends how file was selected for download:
- by checking "Always keep on the device". To cancel this, click on the menu again and uncheck the option.
- by checking "Always keep on the device" for the parent subdirectory. Right-click on the file and uncheck "Always keep on the device".
File is being processed in any way: is going to be downloaded or cleared off, local changes to the files are being processed, newly created file is being processed, for example, is being copied into sync folder.
Files which are ignored by ignore rules are also marked with this status.
Files can be managed through an application, or a file manager using context menu:
- Always keep on the device. Makes file always available on the device and automatically download any file updates from remote agents. This menu item may fail to work if there's a non-Windows agent in the mech and synchronization of NTFS permissions is enabled through the Profile. If the
- Free up space. Converts the file to a placeholder. Until it's processed, file's status is and then changes to Available when online. If “Free up space” is performed on a subdirectory, all items inside it are cleared but browsing inside it is still possible. File won't free up space if it's still opened in an application, and will keep showing .
Files free up space if cleanup timeout is configured in Agent profile, but do that only when folder is rescanned periodically or manually. Files with status "Always available on this device" are not cleaned up.
Double-clicking on a file. If file is a placeholder, it will be downloaded and opened in an application. File becomes "Available on this device".
System’s “Delete” deletes files to Recycle Bin and propagates this deletion to remote agents and puts files to Archive there.
It does not revert files to placeholders! Additionally, placeholders (with status "Available when online") will not be even moved to Recycle bin locally.
When job is removed, all placeholders are removed from disk from "selective sync" agents. Hydrated files remain.
TRANSPARENT SELECTIVE SYNC AND 'LEGACY' SELECTIVE SYNC
Legacy Selective Sync is compatible with Transparent Selective Sync enabled on other agents.
A folder with enabled Transparent selective sync is available over SMB and files are accessible, but with some limitations. Placeholders will be created in the SS share and user can download files by double-click but there will be no context menu for placeholders.
The agent cannot create a Transparent selective sync folder on a network share. TSS folder must be local.
PECULIARITIES AND LIMITATIONS
- Changed file attributes (timestamps, permissions) are not synced from a placeholder to remote agents until file is downloaded locally. For changes to be propagated to remote agents, attributes must be changed after you download the file. Otherwise, changes will be re-written as you download the file.
- Renaming or moving of dehydrated files (placeholders) see above. Fore remote agents to be able to process rename, they shall have Archive enabled. Be sure that: there is at least on Agent with full file copy in the mesh before renaming or moving placeholders and lazy indexing is disabled.
- It's not possible to use new Selective Sync for root of a mounted network share (Z:\foo), Agent will give error
Other Errors related to Transparent Selective Sync are mentioned here.
- TSS folder inherits attributes from previous job or an application which used this technology (Cloud API). In other words, if an attribute was set on a folder (Always available on this device, Available on this device or Available when online) when a job is being created, the agent won't overwrite them and will follow those attributes. This may result in unexpected behavior, for example, the files might be synced automatically. Check the existing flags using an elevated Command Prompt with command
attrib. Read more about it here.