Will Syncthing work for me?

I am trying to decide if SyncThing will be a good fit for the following situation. I live and work in two different locations: two weeks at the first location, then two weeks at the second location. Each location is set up with identical model laptops (with docking station and extra monitors, keyboards, etc.). Each one also has an eternal hard drive where I keep virtually all of my files. My goal is to keep the two external hard drives (and laptops) synchronized so that when I travel from one to another and sit down to work, everything looks the same. (I just spent a couple of painful days, after carrying a hard drive along with me, using WinMerge to make sure that they are currently well synchronized. But that won’t last long without some kind of intervention.)

One possible complication that I see is that the laptops will never be active at the same time. When I walk out the door at the first location, the laptop there will already be either asleep or hibernating. And it will keep doing that the entire time I am at the second location, where that laptop won’t wake up until I get there and sit down to work. If at least one of the laptops is asleep at all times, when and how will SyncThing be able to get the files synced?

Another thing I am potentially worried about is: what happens if I disconnect one of the external hard drives temporarily. Will SyncThing believe that everything on that end was deleted, and start deleting the files at the other end?

Is my only hope to use a third party cloud solution (OneDrive, Google Drive, Dropbox)? Or can SyncThing safely keep me out of the clutches of those people who I don’t really want to have control over my data?

Thanks,

KRC

Welcome here @KRC !

Short summary: Yes, Syncthing can do this, albeit with a little bit of persuading.

Assumptions:

  1. At each site, an external hard drive is connected to a laptop.
  2. The “per site” external hard drives never travel between sites. Neither does the laptops.
  3. You have a third “travel hard drive” which is big enough to have a mirror of all data.

Syncthing is designed to sync between devices and it cannot sync directories on the same device. Normally. :slight_smile:

However, a workaround is to run a second instance of Syncthing on the same device. By doing this, one instance can handle the “per site external hard drive” and the other instance can handle the “traveling external hard drive”.

Note:

  1. The Syncthing instance which handles the “traveling external hard drive” must have its configuration and database (see the --home flag in Command Line Operation — Syncthing documentation ) on the “traveling external hard drive”, because they must “follow the data”, so to say.
  2. The “traveling external hard drive” Syncthing instance shall be configured to sync with both per site Syncthing instances.
  3. The per site Syncthing instances may be configured to sync with each other directly also, just in case both happen to be online at the same time.

Don’t worry. Syncthing has a directory marker which is required for sync to work, so if you yank the drive Syncthing immediately stops syncing that folder because of missing directory marker.

Good luck and don’t hesitate to ask in case something is unclear! And I encourage testing on “non-production data” first.

Or cloud+encryption (Cryptomator/gocryptfs/…) as alternative for portable storage.

Okay. Let’s see if I have this right. I have Laptop X with drive X at one location, and laptop Y with drive Y at the second location. I then also have drive T that travels back and forth. Why can’t I just do the following.

  • On laptop A, I have SyncThing running to keep drives X and T synchronized.
  • On laptop B, I have SyncThing running to keep drives Y and T synchronized.

While T is connected on laptop X, it is not seen by laptop Y, which sleeps peacefully. When ready to travel, I eject drive T and take it with me. Laptop X goes to sleep, not worrying about the missing drive. When I get to my second location, I wake up the laptop and plug in the traveling drive, which then gets synced to drive Y.

So, do I need two instances of SyncThing running on each laptop in order to keep the two (at the time) locally plugged in hard drives synchronized?

KRC

Because of att least two reasons:

  1. Syncthing cannot sync two local directories because of design limitations.
  2. Even if that limitation did not exist, the setup would maybe not work anyway in the general case because of … reasons. Since it is anyway not possible, I see no need to expand on this more than this.

Yes you do.

“Syncthing” is the correct way to spell it. :slight_smile:

1 Like

For local sync I recommend FreeFileSync and its RealTimeSync to the external hard drive that you carry with you. But that is very fragile – only one traveling copy, and if you really depend on having those files available at the other end, that would be too risky for my level of comfort.

Alternatively, (or additional to the traveling external hard drive) if you have plenty of bandwidth at both locations, and what I would personally prefer, is an instance (or two) of a cloud server running Syncthing as an untrusted/encrypted device. The files will always be synced and online, and you will have multiple synchronized copies.

Shameless plug – I run two instances of Backupsy (500GB storage) with Syncthing in a similar setup. They have done well for me, but there’s a reason I have two servers – at least once in the last decade one server has lost everything. (But no less reliable than an external hard drive that got left behind, which I have also done!)

I think syncthing can be made to work in this case but I really do not think it’s the right tool for this.

I’m assuming you don’t want to travel carrying an external hard drive.

You’d be better of setting up a cloud service like Google Drive or OneDrive (though I hate OneDrive)

syncthing would be perfect if you had an always on server located somewhere that both devices could see and sync to when they are on. Absent of that you should be considering a cloud storage/syncing solution.

(or find a friend with an always on and reachable machine and see if they’ll run a syncthing instance for you. But then you will be dependent on them keeping their machine up.)

I also hate OneDrive. But Google has long since abandoned its original mantra of “don’t be evil”, and I have been caught too many times using a Google product that they canceled because they couldn’t figure out how to make money from it. So Google Drive is also out of the question.

But I do have an always-on desktop computer at one of the locations (which is, among other things, my personal non-commercial-cloud music server). I could just leave the “traveling drive” attached to that desktop server. The desktop is backed up nightly to one of the few cloud services I trust (BackBlaze, which has saved me several times already over the years, when eternal hard drives have failed).

I assume that there would be a lag when I first start up the laptop at the second location as Syncthing finally senses the desktop and starts bringing the changes over. But that seems a pretty small price to pay to avoid trying to manually sync the drives.

So, the setup would be:

  • Laptop X with drive X, on for two weeks a month..
  • Laptop Y with drive Y, on for the other two weeks a month.
  • Desktop/server Z with drive Z, on all the time.

Setup both laptop X and laptop Y to sync with desktop Z. This raises a couple more questions. First, should the two laptop even know that the other one exists? Or do they only need to know about the desktop server?

Second, should I set this up with real-time sync or just run some daily batch jobs on each laptop while they are active?

1 Like

Yes!

The laptops does not NEED to be aware of each other. But in a small setup like this, which is easy to manage, I recommend that all sync with all. This makes it easier for you the day when the desktop/server dies, for example. If that happens, you just leave the laptop on when you leave and travel to the other.

Always on is my recommendation. Anything else is just an unnecessary complication.

Good luck!

3 Likes

Yep simple and exactly what syncthing was designed to do. You can use the external drive connected to the always on desktop or if you have enough free space you can store your files on the drive that’s already in the desktop.

As you said it may take a minute or two after you first turn on the laptop when you arrive for the files to sync. But it’s also important to realize that it may take a minute or two after you finish modifying files right before you leave before those files are copied to the server and would be available on the server to be transferred to the new location.