Moved to https://api.fmhy.net
Syncthing has awesome docs - start there if you haven't read them already. This is just a recipe to show how I set it up to have a git-versioned backup on Raspberry Pi.
Once machines are talking to each other via Syncthing add the folder through GUI, share it with another device, switch to that device and accept the incoming folder.
Let's say that the folder is ~/org
.
On the 'backup' device in Syncthing GUI, go to Folder settings > File Versioning, choose "External File Versioning" and in Command input fill in: git-backup-org %FOLDER_PATH% %FILE_PATH%
.
On the 'backup' device create the backup folder and initialize a git repository:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function() { | |
function copyToClipboard(text) { | |
if (window.clipboardData && window.clipboardData.setData) { | |
/*IE specific code path to prevent textarea being shown while dialog is visible.*/ | |
return clipboardData.setData("Text", text); | |
} else if (document.queryCommandSupported && document.queryCommandSupported("copy")) { | |
var textarea = document.createElement("textarea"); | |
textarea.textContent = text; |