syncing two already filled folders

Two Macs, both in use, both with their standard ~/Documents folder. Both folders have their own (different) content. I want to merge both folders on both machines. If I set up A to sync with B and than B to share with A, I get this warning in red

Folder Path Path to the folder on the local computer. Will be created if it does not exist. The tilde character (~) can be used as a shortcut for /Users/henq. Warning, this path is a subdirectory of an existing folder “Documents” (cbaig-wrr9w) . [not actual string]

Can I proceed? Will both folders be merged ? Will ST not remove any files because it thinks they do not belong there (new target folder) ?

It will work in principle, merging the files… HOWEVER:

  1. Make sure you start from scratch on both sides. Remove any existing shared folders for this path.
  2. Restart Syncthing. (To make extra sure it cleans out anything leftover in the database)
  3. MAKE A BACKUP on both sides if possible.
  4. Configure the folder with the same folder ID on both sides. Either manually, or by doing one side and accepting the sharing request popup on the other side.
  5. If you want to be extra careful, set both folders to type “Send only” in the Advanced tab right when adding the folder, before they first start syncing.
  6. After both sides finish scanning and have connected, you should see the differences between them as “Out of sync” items in the respective Web GUI.
  7. DO NOT press the scary red “Override changes” button, it will delete your files on the other side!
  8. Instead, set the type to “Send & Receive” on both sides when you have verified what changes are to be synced.

Note that the “Send only” part is from the top of my head, I haven’t tried it. Hopefully someone else with experience in such a situation could chime in, especially whether the “Receive only” configuration would be more advisable. Anyway, setting it to “Send & Receive” right away is OK as well, it is designed to merge the files initially. The suggestion is more of an extra safeguard step.

1 Like

Thank you for your swift and extensive reply, André! Wow, this scares me off a bit. The Documents folder is (I suspect) a special folder for MacOS. For example, it has a special folder-image depicting a document icon. I can empty it on both sides (moving the content to temp folders), but I am quite hesitant to rename, let alone delete the Documents folder!

And how exactly do I empty / restart the config? By choosing Rescan All from the menu?

(This is my first experience with SyncThings, but already it feels more error prone than DropBox, that in my experience ‘just works’. Is that a fair assessment?)

No, you do not need to remove any files from your Documents folder. I meant you should go to Syncthing’s Web GUI, expand the folder entry you seem to have already, click Edit and then Remove. This will only tell Syncthing to stop looking at this location, not actually remove any of your files. Then go ahead and click Add Folder again, pointing it at the same Documents location.

But now the important bit, you shouldn’t do this independently on both devices, because then they will get mismatching folder IDs. Instead, wait for the sharing request to pop up at the other side, which already presets the correct ID.

Of course you must have mutually added the devices using their device ID / QR code first, to allow them to connect at all.

Merging the files from several devices is in fact the default behavior, but I described some extra cautious steps to avoid getting into a situation where Syncthing accidentally thinks the files have been deleted on one side and propagates the deletion to the other device. Simply because I don’t know exactly what you have tried so far and what info Syncthing has tracked already. So the most important point is to reach a clean slate first. Then doing it right from the start should work without issue. But always better to have a backup if working on your live data.

I agree, compared to Dropbox the initial setup is more complicated. But it’s for the reason that Syncthing provides much more flexibility. Synced files don’t have to be within one single top-level folder for example, but you can point it to arbitrary locations. There is no need for a central authority (server controlled by a company), but you can link an arbitrary number of devices to each other, all with equal status, fully decentralized, no special rolea. And therefore it can also work completely without Internet access. (Of course, storage is only limited by your synced devices’ free disk space and it’s completely free.) That flexibility comes with slightly more difficult setup though, because you need to make more choices yourself.

1 Like

Aha, thanks, your reply made it more clear. I will continue. Thx again!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.