Version 0.8.10 brings “Simple File Versioning”. It can be enabled among the repo settings:
When enabled, each time syncthing replaces or deletes a file the old version will be moved into a directory called
.stversions in the same directory as the file. The file name will have a date stamp (YYYYmmdd-HHMMSS) appended to it. Only the latest N versions are kept, with N being the value set in the config.
Given a file
repoRoot/foo/bar to be replaced, it would be moved to
repoRoot/foo/.stversions/bar~20140525-211000. If there were already N versions of
.stversions, the oldest would be removed.
.stversions directory will not be synced to other nodes.
Note that versioning does not apply to changes you make to files locally. Versioning only applies to changes done by syncthing as a result of changes announced by other nodes.
If this versioning scheme does not fulfill your needs (needs vary, and it will certainly not suit everyone), you are able to implement your own (given some knowledge of programming in Go):