Forcing syncronization of a specific folder with the specific remote machine

Hi! I am using syncthing to keep files in sync between my android and Linux PC machines. Sometimes I want to be sure that a file on my computer was sent to the remote device. In particular, I want so when I am going to turn the PC off. Is it possible to obtain such information? What tool may I in order to obtain this information?

Regards, Sergey

You can force a rescan, wait a few seconds and check if its still 100% up to date.

Can I use a command-line utility to force the rescan? Could syncthing-cli do this? Also, is it possible to force the rescan ‘against’ a specific remote machine?

You could potentially use syncthing-cli, you might need to fix it as it hasn’t been maintained and is potentially out of date.

Rescan only has meaning locally, as we are rescannig the local filesystem.

You can also use the rest API to achieve something loke this. Its documented in

I’ve examined the API section of docs. Am I understand it correctly, that in order to compare files between local and a specific remote machine, I have to connect to local and remote servers, send them GET /rest/db/file requests, then analyze outputs? What does “availability” attribute mean?

PS probably, I am wrong. In the example output there are “global” and “local” attributes for a single file of interest. Do they correspond to local server, and to the remote machine named “global” ?

What is it that you want to accomplish? Doing what you say does compare the information syncthing has about the file in question on both sides, yes. “Availability” is the set of devices that has the latest version available for pulling. “Local” describes the version that the device you are asking has. “Global” describes the newest available version.

Thanks for the clarification. As I said before, I want to be able to detect whether the local file was sent to the specific remote machine or not. Given the right API, I would write the command-line tool (my plan was to use Haskell binding library

Can I access symbolic names of devices listed in the availability “section” ?

Ah, right. Yeah, then you need the /rest/db/file call, and you need the remote to be connected at the time. You can get the names for the device IDs from the /rest/system/config, assuming you have names set in the config.