The Options tab in the dialog of a synchronisation sets what source and target are compared by and what happens in the special cases.
These three ticks decide how AutoFileSync recognises a difference. They can be combined.
| Criterion | Meaning |
|---|---|
| Time | The modification time decides. This is the usual case and by far the fastest. |
| Size | Different file sizes count as a difference. |
| Content | The files are compared by their content. This is exact, but costs reading time on both sides. With two-way synchronisation the modification time additionally decides which side is the newer one – a comparison by content alone cannot tell. |
| Tolerance in seconds | Two modification times at most this many seconds apart count as equal. The field is only active while comparing by Time is switched on; the default is 2 seconds, see Tolerance and file systems. |
When copying, AutoFileSync takes over the modification time of the source, but the target stores it only as precisely as its file system allows. Without a tolerance the source would then be fractions of a second newer than its own copy on every run and would be copied again and again. The tolerance must be at least as large as the coarsest time step on either side:
| File system | Precision of the modification time | Tolerance needed |
|---|---|---|
| ext4, Btrfs, XFS, APFS | nanoseconds | 0 s |
| NTFS | 100 nanoseconds | 1 s |
| exFAT | 10 milliseconds | 1 s |
| HFS+, SFTP servers | whole seconds | 1 s |
| FAT32, FAT16 (USB sticks, memory cards) | 2 seconds | 2 s |
The default of 2 seconds covers all of these cases. FAT also stores the time as local time: after a change between summer and winter time all files appear shifted by one hour. To avoid that, set the tolerance to 3600 seconds for a while or also compare by Size.
The other side of the tolerance: if a file is saved again within the tolerance after its previous change, and a run happened in between, the second change is noticed only with the next save. If you edit files in quick succession, it is best to also switch on Size, or to set the tolerance to 0 if both sides store the time equally precisely.
| Option | Effect |
|---|---|
| Delete the source after copying | After a successful copy the source file is removed – into the recycle bin or permanently, depending on the delete mode. This turns a synchronisation into a move. For sources reached over SSH the option has no effect. Together with this option, Two-way synchronisation and Also delete deleted files in the target are disabled: the one would copy the moved files back, the other would delete them in the target again. |
| Two-way synchronisation | The opposite direction counts as well: what exists only in the target is copied back into the source, and deletions, edits and renames are carried over in both directions; see Two-way synchronisation in detail. Together with Also delete deleted files in the target, deleting wins. The option excludes Delete the source after copying and Copy even if the target file is newer; whichever is set first disables the other. |
| Copy even if the target file is newer | Normally AutoFileSync does not overwrite a target file that is newer than the source. With this option it does. With two-way synchronisation switched on the option is disabled, because it makes no sense there. It is also disabled while neither Time nor Size is compared, because only those criteria can find a target newer than the source. |
| Generation principle | Before an existing target file is overwritten, AutoFileSync renames it: report.doc becomes report.doc.bak.1, the next time .bak.2 and so on. Older versions are kept this way. Note that these backups stay in the target and take up space – without the limit below they are not cleaned up. |
| Earlier versions kept per file | Belongs to the father-son principle and limits how many versions are kept: with 5, the five newest .bak versions of each file stay; the oldest is deleted for good as soon as a new one is made. 0 (the default) keeps all. The numbers keep counting, the highest is always the newest version. The clean-up happens when a file is replaced again and about once an hour for the whole target – a newly set limit therefore also trims the versions of files that no longer change. |
| Encrypt the target | Writes the files into the target encrypted; names and folders stay readable. Details and limits are given further down. |
| Also delete deleted files in the target | A file that exists only in the target any more is deleted there – the target becomes a mirror of the source. Details and limits are in the section below. For the type File and together with Delete the source after copying the option is disabled. |
| Backup proof | Every run that copied something or ran into an error writes an entry into a proof file; see Backup proof. |
| Synchronise empty files | Files of size 0 are normally skipped: an empty file is more often an interrupted write than a file meant to be empty, and copying it over a filled target file would lose data. With this option they are included – meant for placeholders such as .gitkeep and for lock and marker files. Caution: if the source file is empty and the target file is not, the synchronisation then replaces the target's content with the empty file. |
| Warn if the drive or SSH connection is missing | When the source or the target cannot be reached – an unplugged drive, a share that is not connected, an SSH server that does not answer – the synchronisation is skipped; nothing is copied and nothing is deleted. That is not an error. With this option (default: on) "Synchronise once" reports the skip as a warning, and the log holds a warning. For a backup disk that is plugged in only now and then, switch the option off: the absence is then only noted in the log. In detail: Unreachable drives and connections. |
| Recognise renames and moves | A file renamed or moved in the source is renamed in the target as well, instead of being transferred again and deleted under its old name. For this AutoFileSync keeps a sync state for this synchronisation too. The option only takes effect together with Also delete deleted files in the target, because the rename removes the old name in the target. With two-way synchronisation the recognition is always on; a file item has nothing to rename. |
| Keep both versions on a conflict | If a file was changed on both sides since the last synchronisation, the version written last wins and the other one survives next to it as a conflict copy; see Two-way synchronisation in detail. Default: on. Switched off, the run reports the conflict as an error and leaves both sides as they are. Only available with two-way synchronisation. |
| Pick up changes at once | In a continuous run and in the background service AutoFileSync watches the local directories of this synchronisation and starts a pass as soon as something changed there and the change has been quiet for two seconds, instead of waiting for the next tick. The pause in seconds no longer matters for a watched synchronisation. Without a change a full pass still runs every ten minutes as a safety net, since not every change is reported: a network drive reports none, and a directory over SSH cannot be watched - there the tick still applies. Default for new synchronisations: on; existing ones keep their tick until you set the option. The log names what is watched when the run starts. |
| Seconds of pause | Waiting time between two runs of a continuous synchronisation, adjustable from 1 to 60 seconds. Short pauses notice changes sooner and put more load on drives and network. |
| Symbolic links | What happens to symbolic links. Copy file links as files, skip folder links is the default and what the program always did. Keep as links creates a link in the target again: a link that points into the synchronised folder becomes relative, so that it leads to the copy in the target; a link that points out of it stays unchanged and is reported. Targets without symbolic links – cloud storage, FAT and exFAT drives – skip such links with one warning per run; the content is not copied in their place. Follow the link also copies what lies behind a folder link – that can be far more than the chosen folder. Links that lead in a circle or into the target folder are not entered. This setting is not available together with two-way synchronisation or Delete source after copying. Links into system directories and links that lead nowhere are skipped in every setting. With the type File there is nothing to choose. |
With Encrypt the target AutoFileSync writes every file into the target encrypted – onto a drive, over SSH or into a cloud store. Whoever can look at the target sees file and folder names, sizes and times, but no contents. The source stays as it is.
The files are in the open age format and keep their names. They come back through Restore files, or without AutoFileSync with the free program age, for example age -d -i autofilesync-age-key.txt -o readable.doc report.doc.
The key is made when the option is first switched on, and it is shown. Keep a copy away from this computer – without it nobody can read the files in the target. Under Edit → Encryption key… it can be shown again, saved to a file or put in on a new computer. One key serves all encrypted synchronisations; a key that is put in does not replace the present one but is added to it.
Limits: encryption works in one direction only – two-way synchronisation and Detect renames and moves are locked –, the source has to be on this computer, and files are compared by time and size. For a target over SSH or in the cloud each file is first written as an encrypted scratch copy in the temporary directory, which needs room for the largest file. If the option is switched on or off later, the next pass replaces the files in the target with the encrypted or the readable version.
A whole encrypted target is brought back with Synchronisation → Restore an encrypted target…, after losing the source, say, or on a new computer (put the key in there first): choose the encrypted folder – on a drive or through Server… –, give a folder for the readable files, Restore. The target is not changed, files already in the chosen folder are never replaced, and files of the target that are not encrypted come along. Earlier versions (.bak) come along only if asked for. Whatever could not be decrypted is listed at the end.
On the Schedule tab a synchronisation can be limited to certain times: Synchronise at certain times only, with a period from–until and the days of the week. Outside it the synchronisation rests; the status line then shows Waiting for the schedule. This way large backups run at night only, or on working days only.
A period across midnight, say 22:00 until 6:00, belongs to the day it begins on: with "Fri" it runs from Friday evening to Saturday morning. Equal times mean the whole day. The schedule applies to the running synchronisation and the background service; Synchronise once and the preview always run at once. A pass still running at the end of the period is finished.
With two-way synchronisation AutoFileSync remembers after every run what state each file was in on both sides. This sync state is a file next to the configuration (subfolder state, one file per synchronisation), shared by the program and the background service. With it the next run can tell whether a file is new or was deleted on one side:
The first run after setting up – and the first after updating to the version with the sync state – knows no state yet and behaves as before: what exists on one side only is copied to the other; a deletion is recognised from the second run on. The preview shows beforehand which deletions and renames are due.
Protection against mass deletion: a target that was emptied – a freshly formatted backup disk, say – would look like "everything deleted in the target". If a run would delete more than half of the known files (and at least ten), it refuses all deletions of that synchronisation, reports this in the log and after "Synchronise once", and leaves both sides as they are. The preview shows the deletions all the same; if they are intended, "Synchronise now" in the preview carries them out. The background service refuses them until you have done so.
This option deserves a closer description, because it is the only one that removes data in the target.
If the option does not take effect although it is set, When something does not happen as expected helps further.