Skip to content

Files and locations

Everything dotsync keeps on a machine lives under the XDG base directories. The paths below are the defaults; each group moves if you set the matching variable (XDG_CONFIG_HOME, XDG_DATA_HOME or XDG_STATE_HOME) to an absolute path. Nothing here is ever synced.

Path Purpose Safe to delete?
config.json the machine configuration only if you run init again
Path Purpose Safe to delete?
repo/ the cache clone of the shared repository. dotsync resets it whenever it needs to, and at least daily. Never edit it yes; run init to recreate it
icon.png the dotsync icon, for desktop notifications yes; it’s recreated
Path Purpose Safe to delete?
state.json the base of every managed file, queued changes, conflicts, the last sync’s result, housekeeping dates, and a cache of file metadata so unchanged files aren’t read again yes, but see below
state.json.corrupt-<time> a state file that couldn’t be read, set aside yes
backups/<run>/ copies of local files dotsync replaced or deleted, one directory per sync run. Pruned after backup_retention_days, keeping the newest copy of each file yes, any time
conflicts/ a copy of the repository’s side of each current conflict, for diff yes
sync.log, sync.log.1 changes, conflicts and errors, rotated at 1 MiB yes
agent.log the background job’s output, with launchd and cron yes
lock keeps two syncs from running at once yes, when no sync is running
Path Purpose Safe to delete?
~/.local/bin/dotsync the binary the background agent runs, unless Homebrew or apt installed dotsync reinstall with init or the install script
~/Library/LaunchAgents/io.github.dotsync.plist the background agent on macOS use dotsync agent uninstall
~/.config/systemd/user/dotsync.service, dotsync.timer the background agent on Linux with systemd use dotsync agent uninstall
a line in your crontab ending in # dotsync-agent the background agent on Linux without systemd use dotsync agent uninstall
  • If state.json is unreadable, dotsync sets it aside. On the next sync, every file that differs from the repository becomes a conflict for you to review.
  • If it’s deleted, every entry counts as newly managed on this machine, as on a fresh init. Differing local files are backed up and replaced, or become conflicts if on_existing is "conflict".

Either way, files that match the repository are simply recorded again, and nothing is replaced without a backup.