In the Destination tab of the sync settings you can select the backup strategy, which defines if and how overwritten and removed files can be recovered.
The default. When a sync overwrites or removes a file on the destination, the old file cannot be recovered. You can keep this option if you only need a copy of the latest version of a file.
Move old files to the trash
Files that should be overwritten or removed are moved to the trash. The trash keeps a flat list of all files that are moved to it. Since the original directory structure is not preserved, you can only recover individual files before the trash is emptied.
Move old files to…
Files that should be overwritten or removed are moved to the selected backup directory. The original directory structure is preserved, but to save multiple versions of the same file in the same directory, each filename is appended the current timestamp. The timestamp has the format yyyy-MM-dd[T]HH-mm-ss+ZZZZ, which is independent of the current system locale and takes the timezone into account. Moreover, this timestamp is used to determine which backup files lie outside of the selected timeframe and will be removed.
You can select a custom backup directory for each destination base of the sync item. The backup directory has to be on the same volume as the corresponding base; if inside the base itself, the backup directory is automatically excluded from the sync.
Incremental, link unchanged files
Each sync creates a directory named with the current timestamp, which is used to determine which backups lie outside of the selected timeframe and will be removed. The first sync copies all files. During following syncs, all unchanged files are linked to the previous backup directory.
The linking is achieved by means of so-called hard links, which allow referencing a file from multiple paths. Regardless of how many hard links exist to a given file, no additional space is required. A hard link looks just like the regular file it was linked to and points to the same data, so editing the contents of any link updates the others as well.
You can restore files or directories from any of the backup copies by copying them in the Finder. When copying a file in the Finder, even if it was originally created by a hard link to another file, the new file is a genuine copy which can be edited without affecting the backup.
You can display the number of hard links to a file with the following Terminal command:
ls -l /path/to/file
You can find out whether two or more files are linked by running the following Terminal command and comparing the serial numbers for each listed file:
ls -i /path/to/file1 /path/to/file2
You can find all files in a given directory with a given serial number with the following Terminal command:
find /path/to/directory -inum serial_number
Note: because editing a file also updates its hard linked copies, incremental backups are not supported for two-way syncs, since every base would be at the same time source and destination, and editing a file on the destination would cause the linked files in the older backup directories to be updated as well. However, you can add a separate sync item for each base of the two-way sync to create an incremental backup to a separate directory and, optionally, make a dependency chain.