Skip to content

Following symbolic links on Linux Agents

Starting with Resilio Connect v2.12.5, Agents on Linux devices can follow symbolic links and synchronize them as follows:

If a link points to a file, it will be synced as a file to remote Agents, with link name though. If a link points to a folder, it will be synced as a folder to remote Agents.

symlinks.png

This behavior is enabled by custom parameter follow_symlinks:true in the Job Profile. In Resilio Connect v3.4.0 the parameter is available in Job profile.

follow.png

Warning

  • Use this parameter only in Job profile so that all agents either follow them or not. The parameter is ignored for non-Linux Agents (but not macOS).
  • Avoid using this parameter in a job with agents older than 2.12.5 (undefined behavior, see below).
  • The parameter is not compatible with Resolve filename conflicts "Yes" , the job will give error about unsupported symbolic links.

Can be enabled for an already created job. However before enabling it, it's advisable to check the folders and see if there are already symbolic links which do not have target on the Computer (see how symlinks sync between Linux machines here). Remove the link, otherwise the agents with such a link, will not be able to download the 'followed' symlink and give the error about unsupported symbolic link, or "Cannot finish download":
cannot_finish.png

In either case, the fix is to remove the symbolic link which points to nowhere and restart the distribution or consolidation job, or force subfolder scan on the synchronization job.
Alternatively, enable option "Skip file errors" in the Agent profile and a broken symbolic link will be ignored and job run will continue. The job run will not report the error, but will record event "Path skipped" in the job's log. The job run won't be aborted.

Limitations and peculiarities

Resilio agent can detect that something changed in the link target and sync it to other Agents. However, it's detected only at folder scan - system notifications don't work for the link target.

if changes are made on remote agents, they are synced back to the source Agent. This will break link-to-file (target file does not receive these updates) and link is moved to archive. Actually, the link-to-file will break shortly after one of the remote Agents scans its folder and discovers a 'file'.
Therefore synchronization of links does not make much sense for sync jobs.

Link-to-folder is preserved in this case.

Hidden files inside the link target are not synced

if a link is removed (unlinked), the file/folder is moved to the archive on remote Agents for Synchronization jobs.

If source of files is an old agent that doesn't support following symlink, or the option is disabled for it, it syncs it as a symlink. Other Agents will receive it as a broken symlink (pointing to nowhere) and give error about unsupported symbolic link.

Agent counts the files in link target, file or folder, and reports this count in Files column in job run.