For instance, I have Syncthing syncing a “JOBS” folder on a windows desktop, laptop, and a NAS, and I want to sync a few files with a new client without sharing and syncing the whole “JOBS” directory with it.
I created a new folder on the local, i.e. FEWJOBS, and copied the few files to it from the JOBS folder. It appears to be syncing correctly with the remote but now there are two versions of the files, and I only want one version.
Thank you, I searched and got some documentation, watched some videos, and downloaded software, and I think that will work. I wasn’t aware that hardlinking on windows was available. One of the files is a pretty large SQLite database, and I hope it plays well with it. I will post the results.
It is working well so far. Actually I wasn’t as concerned about the syncing process with the database as I was with the hardlink because I wasn’t familiar with it. Thank you for pointing me in that direction.
I have been syncing databases for a while without any problem, but I am sure you are more experienced in this than I am. I hope syncthing continues to work well with all my files.
One thing I have noticed is the hardlink files do not update instantaneously as I anticipated. Or my little password manager database file has not, although it appears to sync correctly. This may be the vulnerability you were speaking of, or I don’t have the hardlink applied correctly.
Hardlinks don’t work (or rather break) if you replace files, which databases quite often do, as they usually create a new file, write out all the data except the data that has been marked deleted, and rename file on top of the old file.
That’s a completely new file so the hardlink points to the old, now effectively overwritten file on disk.
The hardlink is breaking to my KeePass database file, which is unfortunate, but I appreciate the info, and will have uses for hardlinks in the future.
I think it will work to create a directory in my primary work directory which is shared and synced between three clients, isolating the few files that I wish to sync with my iphone, and share this new directory with it also. This should eliminate the multiple file problem and will give me a chance to see how these files are going to work with just Syncthing. It will be a little inconvenient because of the file location, but worth it if this works.
Thanks. I could exclude all the other files if they were not changing and accumulating. Perhaps there is a way to exclude all the files in a directory except the subject file(s) in question with a “wild card” or variable?
It seems like this would be a good feature to request in a future release of Syncthing if others would benefit from it, but it may be too difficult of a task for programmers.
I created a .sfignore file in the \ACADJOBS\PROJECTS directory and shared it with my iPhone. Since the \ACADJOBS directory is the root directory for syncthing with my other clients, it is not using the .stignore with them. It appears to be working.
If this works, I’ve got to figure out the best way to control collateral damage with my database files, or the best way to manage them with syncthing. Others must be syncing them somehow.