Trying to sync my home directory between to Linux systems. No matter what I try my home directory (/home/bob) shows up on the remote system as /home/bob/bob. I’ve tried .stignore, using just “~”, “~/.”, “~/” and it always come over as /home/bob/bob. Does anyone have a simple setup for doing this? Is there any simple documentation that show how to do this?
Have you tried using the absolute file path on both Devices?
Yes, but on the receiving end I’m not able to apply that choice.
What happens when you try please?
I define the folder on the sending machine with a folder name of “bob”, default the folder ID and set the path to “~”, “~/”, “/home/bob” or “/home/bob/”. The receiving machine says the sending side wants to share a folder by the folder ID, and I accept that. The files come over in “/home/bob/bob…” not “/home/bob…”. If I define a receiving folder on the receiver side, it is ignored and a new folder is defined as above when the sync starts. This happens with or without any .stignore file. I just downloaded 129.2 on both machines and get the same results.
BTW, if I leave the folder name blank, the receiving side syncs the sending side files into /home/bob/“folder id”.
And if I try syncing a single folder, say “/home/bob/.thunderbird” it comes to the receiving machine as /home/bob/“Folder Name” or /home/bob/“Folder ID”. I am unable to specify the folder pathname on the receiving side to make it match the folder pathname on the sending side.
May have found a partial or work-around solution. Defining the receiving folder side first seems to work for getting the folders to sync correctly between the sending and receiving machines. I’ve specified that the sending machine is send only and the receiving machine is receive only at the moment, so I’m not sure how this can be made to work if both machines are set to send-receive to keep them in sync.
You need to enter the (local) path when accepting the share. Just as you do when creating it on the other side. It’s the bottom field of the dialog that pops up when you click “Add”.
Unfortunately that field is locked on the receiving side and can’t be changed as far as I can tell.
No, it’s not. Only after the folder has been added, but not when you open the dialog to accept it the first time.
Well it’s locked on my system and I can’t change it when trying to accept the incoming connection. What needs to be done to unlock it?
Take a screenshot of when you think it is locked.
I can, but I think I found the problem. If you were wanting to see if the “Folder ID” and “Folder Path” were both greyed out, they are. It seems that if “Auto Accept” is specified in the Device Setup area this happens; unchecking “Auto Accept” then presents a non-greyed out “Folder ID” and “Folder Path” on the receiving machine side. Kind of obscure I guess, but I think I have it working now and really appreciate your assistance!
BTW, just a personal observation here, but the term “Folder” in the send/receive dialog windows seems to be a bit overloaded. It all started making a lot more sense to me when I thought of the “Folder Name” as “Session Name” and “Folder ID” and “Session ID”. Then the “Folder Path” became a lot clearer in my mind.
This is the critical piece of information that was missing in the original post . In short, auto accept doesn’t allow you to create subfolders simply by adding forward slashes (or backslashes on Windows) to the folder label. This is by design.
The actual problem was not about creating subfolders by including a slash in the label. It was about wanting no subfolders at all getting created.
The auto-accept option is for specific use cases where an advanced user knows exactly what they need. I’d never recommend it to any new user who had not even once gone through the process of accepting a folder share manually. Which was the case here apparently and that’s also why it was impossible for the OP to know what step was missing.
Regarding the term “folder”, it would be factually misleading to call it a “session”. It’s named folder because on each participating device, a folder exists that Syncthing keeps up to date with the folders on the other involved devices. Because those folders are effectively replicated between the devices, we call it a “shared folder” or “synchronized folder”, because the contents are the same in each copy. And for brevity, as synchronization is already in the name of the software, it’s just referred to as a “folder” usually.
A session would be the correct term for the time frame during which two devices are connected and actively exchanging data or keeping the connection open while waiting for changes to communicate to the other device.
I really appreciate the quick support and the patience shown me as I struggled to get it working. And I fully understand from my 50+ years of software engineering and user support how difficult it is to diagnose and help a struggling user when not all the necessary details are provided up front. No doubt the design and implementation of SyncThing is robust and my issues came from a lack of understanding of the Folder concepts used as well as when and where the “/” is needed, expected or required. From a number of articles I researched in this area it appears I’m not the only one who struggles with this. Unfortunately I was unable to locate any good working examples of how to set things up for doing a simple sync like I’m doing, so I landed on this forum. Hopefully the dialog here may provide some guidance for those who follow in my footsteps.