Planning to run Syncthing on my Windows 11 laptop and sync it with my TrueNAS as a backup.
What did I do:
-
Install latest version for windows for personal use (so it can access my documents folder): v1.27.6, Windows (64-bit Intel/AMD) “Gold Grasshopper” Build 2024-04-08
-
Install the latest version for TrueNAS Core: v1.27.6, Linux (64-bit Intel/AMD Container) “Gold Grasshopper” Build 2024-04-08 (noupgrade, stnoupgrade)
-
Connect /Data on the NAS to the SMB share on that same NAS. I first used a folder on the NAS that I created from my windows machine, but every file or folder added by Syncthing was unaccessable by any other user. Since a backup that I can’t access is not usefull, I connected Syncthing with the SMB share using the same user my windows machine uses to connect. So now both Syncthing and my Windows machine can access the files. (in case I ever need to restore a file from the backup.
-
Connected both Syncthing machines. They are on the same network but did not see each other, no problem, by using the device identification they could find each other no problem.
-
Created a Test folder on my windows machine and shares it with my NAS. This worked almost immediately with my document.txt file.
-
I switched on File versioning on the NAS side. I chose Staggered file versioning, but now when I edit a Word document, the backup file is copied (0kb) but the original document disappears form the NAS. It did still make versions when I modified the document on the windows machine, but in the actual folder I could not see a file. Restoring one of the backups did not work, still no file in the folder.
-
I created a filter **/~$. to stop syncthing from backing up temporary microsoft office files.
-
Adding a new Word document to the Windows folder no longer adds the document to the NAS folder. So I removed the filter, but no luck.
-
I removed the backup folder from the NAS (told syncthing to forget about it, then removed the actual folder) Then told syncthing on my windows machine the folder is no longer shared. (it does know, but does not inform me about anything unless I open the dialog) Then I reshared the folder to my NAS, and when I accept the share there, it complains that it can not create the folder.
-
I removed the backup folder from my NAS again (just told syncthing, since there was no folder to remove). Then I also told syncthing on my windows device to forget about the folder. After adding the folder on the windows machine and sharing it with the NAS again it could create the folder structure without a problem again. So there is for sure a problem with re-sharing a folder to a machine that already knew the folder at some time in the past.
-
Now even without setting up versioning on the NAS side, Word documents are not synced. I copied some word documents to my windows folder and none showed up on the NAS side. Then I added a test.txt file and that showed up almost immediately.
-
Since the NAS has only a backup of the files, I set up my windows machine as Send only and my NAS as Receive only. Now as soon as I add a test2.txt file on the windows side, it shows up on the NAS backup folder, but without doing anything myself, syncthing decides that the backup file has changed and is therefore out of sync with the windows folder. I’m 100% sure that the file has not been changed, no one had access to this folder and I didn’t do it either. I saw this behaviour when versioning was on, but even without it, it occurs.
-
Several things went wrong in the steps above, but syncthing status is always “up to date”?
Any suggestions on how to set up syncthing so it will make reliable backup’s of my files without skipping Office 365 files, preferably with versions kept on the NAS side?