How Do I Keep an External Hard Drive in Sync Between Two Computers?

Hardware:

  • Main “Host” Computer - This is the main computer into which most of what needs to be synced is dumped.
  • External Hard Drive - This is where everything from the main computer is synced to.
  • Laptop - This is where a Syncthing instance is ran to sync between the main computer and external HDD.
  • Second Computer - This is where another Syncthing instance needs to be ran to sync between the main computer and external HDD.

What I Want to Happen:

Currently, the Syncthing instance on my laptop syncs the ext HDD and computer just fine. However, I want to be able to move the ext HDD between my laptop and second computer and have it sync the files in my main computer regardless of whether it’s connected to the laptop or second computer.

Question:

What’s the best and safest way to configure Syncthing to allow this setup?

Specifically:

  • How should I set up Syncthing on the laptop and second computer so that they both recognize the external hard drive as the same device, even when it’s moved between them?
  • Are there any specific settings I should enable or precautions I should take to avoid file conflicts or sync issues when switching the external hard drive between the laptop and second computer?

If this setup is more complicated than it’s worth, I’m also fine with just switching my Syncthing instance from my laptop to my computer. So that whenever my ext HDD is plugged into my computer, it syncs between the host computer and the ext HDD. Though, I’m not sure what’s the best way to do that is either.

Thanks for any help!

Welcome here @Oddity-Official !

This use case is a perfect match for Unison. Not Syncthing.

(For brevity and clarity, I’m going to use the letters “M”, “L” and “S” to refer to your “Main”, “Laptop” and “Second” computers.)

What’s not clear is if L and S will be pushing changes back to M.

Even if the external drive is bound to the same Windows drive letter on both L and S, to Syncthing it’s just a drive.

One option is to also share the same Syncthing configuration. Probably the most convenient solution is to keep the configuration (including Syncthing’s database) on the external drive.

Note that you’ll then have to work out manually starting Syncthing after the external drive has been plugged in and available. If things aren’t successfully done in proper order, you’ll end up with conflicting configurations at best, lost of data at worst.

If you don’t share the same Syncthing configuration between L and S, and if L and S are also “Receive Only” devices, you’re going to run into a problem when the drive is plugged into L, it’s going to receive changes that S doesn’t know about. Then when the drive is moves to S, S is going to see changes that seemingly appeared out of nowhere.

Syncthing gracefully handles drives being disconnected and later being reconnected, so what you’re asking is doable, but littered with potential issues.

But if L and S are effectively acting as a “backup” of M, then I 100% agree with @martinleben that Syncthing isn’t the right tool for the job.