Configuration file

All synchronisations, SSH connections and settings are in one file in JSON format. It is this file that the program and the background service share.

Where it is

Windows %APPDATA%\autofilesync\autofilesync.json
Linux $XDG_CONFIG_HOME/autofilesync/autofilesync.json, otherwise ~/.config/autofilesync/autofilesync.json
macOS ~/Library/Application Support/autofilesync/autofilesync.json

Opening and saving

What it contains

For each synchronisation name, type, source, target, wildcard, exclusions, the options and the pause; in addition the SSH connections and the global settings. Passwords for SSH connections and for the outgoing mail server are stored encrypted, not in plain text.

The file is UTF-8 and can be looked at with a text editor in an emergency. A key that an older version of the program did not know yet is simply missing in old files – AutoFileSync then uses the documented default and loads the file anyway. A single damaged entry does not lose the whole configuration either; it is skipped.

An example is the key warnIfUnreachable among the options of a synchronisation (syncflags). It carries the option Warn if the drive or SSH connection is missing: true means a missing drive is reported as a warning, false that it is only noted in the log. If the key is missing because the file comes from an older version, true applies. The other options sit under their own keys next to it and default to false when missing from old files. What the option does is described under Unreachable drives and connections.

When writing, the existing file is not destroyed if saving fails – when in doubt, the old state is kept.