Syncing removable media folder

Hello, I’m currently using syncthing on my laptop and on a RaspberryPi (as an always-on server).

I have this pendrive where I keep important files, that I want to be kept in sync with a folder on the server (RPi).

I’ve mounted the pendrive on my laptop and setup the sync with the RPi. Everything works correctly.

But, when I unmount the pendrive, obviously the folder to be synced is not there anymore, and syncthing reacts by “stopping” it (It would say “STOPPED” and give an error: “Error: lstat /media/luca/KINGSTON/Documenti”)

If I mount the pendrive again, syncthing will not notice this, and the folder will stay stopped unless I restart syncthing on the laptop. Is there any way to make syncthing realize the folder is now mounted again, and make it sync automatically (without the need to restart it)?


Currently no. This is

I knew it couldn’t be a new issue, but I couldn’t find it when I searched. I understand it’s not top priority, but is there any chance we can see this new enhancement added to syncthing anytime soon? Thanks and keep up the great work! Luca

I am trying to working around this one myself using the API, but I trying to restart syncthing seems to fail :frowning: What I do is the following:

  1. I check with :
curl -s X-API-Key:<api key><foldername> |grep "folder path missing" > /dev/null

if the folder is missing and then I try to restart syncthing with: 2) restartcommand:

curl -s POST X-API-Key:<api key>

then I get the result:

In maintenance
CSRF Error

and syncthing didn’t restart…any idea what I am doing wrong? I am not used to curl to much yet and not with API’s like these in general so I am probably doing something basically wrong :blush:

I just wanted to thank the developers for adding this feature in v11.0! :slight_smile: So, THANK YOU!!