Local sync between directories

I think the issue #4721 Local sync between directories should be re-opened.

It’s been 6 years since this issue was opened, and I believe it needs to be revisited. The only way to achieve the goal of synchronizing local directories is by resorting to some sort of workaround.

The use case is evident:

Sometimes we have more than one different disk on which we want to keep files synchronized. I know it’s possible to use other tools for this, but it would be great to group everything into Syncthing and also benefit from the version control it offers.

Creating more than one instance on the same machine feels like a massive hack. We need to implement this! It seems like a feature everyone wants.

Related:

Respectfully, in my opinion Syncthing is the wrong tool for this purpose.

1 Like

Respectfully, I’ve read hundreds of similar arguments. However, if this were the wrong tool, there wouldn’t be such a high demand. The explanation for wanting to use Syncthing instead of another tool is simple:

  • It generally handles conflicts better than other tools.
  • Convenience of using just one tool rather than several that do the same thing.
  • Built-in version control, automatically and consistently.
  • Syncthing should be versatile with folders. It should allow adding more than one folder with the same ID and synchronize them without complaining.
  • If implementing this is too difficult (and this seems to be the REAL reason behind the hesitation), it’s possible to release a version that spins up a new instance and treats the other folder as if it were another device.

Syncthing does a lot of things that you want…but uses BEP (Block Exchange Protocol v1 — Syncthing documentation) to do it between devices.

Perhaps you could fork the Syncthing code to do what you want it to do, using the filesystem?

The issue is open. It’s closed for commentary because the use case is clear and doesn’t require further discussion on GitHub at the moment. What it needs is someone who wants to implement it. At that point it would be valid to discuss the details of the implementation.

1 Like

(Note that I’m not arguing for/against adding support for syncing between local directories. My day job includes managing backups and mirroring data between various devices, servers and datacenters so I use a variety of tools that fit the particular need.)

You didn’t elaborate on your particular use case – e.g. backups, alternative to RAID – but if it’s the most popular one, below are some thoughts and pointers.

Although there’s a lot of interest in using Syncthing as a backup tool, it doesn’t make Syncthing the right tool for backups (it is, however, a great addition as part of a backup scheme).

The same logic applies to the majority of interest in syncing between local directories where the end goal is often for a RAID-like system without RAID – most frequently for backups.

So, in that context…

Normally the contents of the target storage aren’t intended to be modified by users. And if the backup/sync tool is doing its job, there won’t be any conflicts.

Generally I completely agree with that sentiment, however, a network sync tool (e.g. Syncthing) and local directory sync (e.g. SyncToy) are only doing the same thing in name only – under the hood the machinery is very different.

Most of the things that make Syncthing, “Syncthing”, are of no use when syncing between local directories (e.g. BEP, discovery, introducer, NAT traversal, etc.)

It’s not just the Syncthing server that needs to be modified to support syncing between local directories, but also the web and mobile app user interfaces.

Syncing between two local directories is already supported by a long list of tools. While it does mean using a different tool, the right tool for the job makes the job a lot easier.

There are a lot of apps that have tried to be everything to everyone, and the old saying “jack of all trades, master of none” comes to mind. :smirk:

NTFS, NILFS and other filesystems already support versioning more efficiently at the OS-level.

Versioning in Syncthing helps with recovery after user error, but doesn’t guarantee that a saved version is viable after it’s been written.

Syncthing folder IDs are used to keep track of the Syncthing folders independently of the Syncthing folder name and filesystem path, so allowing multiple Syncthing folders with the same ID would upend how Syncthing keeps track of folders on a device.

It’s already supported in the current versions. Use the –home option to specify a custom target directory for Syncthing’s configuration and other files.

3 Likes