Using Syncthing with a removable hard drive

Syncthing is designed to be able to work in such setups. What it does behind the scenes is create .stfolder in each folder that is set up to sync. If at some point later Syncthing tries to read this folder, and .stfolder is not there (this may happen if the folder was a mounted filesystem that got unmounted), Syncthing stops working on that folder. Basically, exactly the behaviour you expect.

There’s one caveat to keep in mind, though. Imagine a folder structure like:

+-- foo/
|  +-- bar/ <-- [a mountpoint of a removable filesystem]
|  |  +-- file01
|  |  +-- file02
|  |  +-- file03
|  +-- baz/
|  |  +-- file04
<...> etc

If you share bar, you’re in the clear, as described above.

However, if you share foo, then .stfolder only gets created in foo, not in bar or baz. So in case bar gets unmounted it just looks to Syncthing that all the files in it got deleted by you, and it will happily delete these files on all the remote devices, too.

3 Likes