there is a set of удаленных hosts on which the rsync-сервер is spinning. It accepts and adds file folders to a specific directory.
such files and folders are sent from the server to the nodejs using the rsync client.
The question is: is it possible for the nodejs server to ask the hash sum of a specific directory for the rsync server on the remote host?
purpose It is necessary to implement the monitoring of business versions as well as system solutions, essentially an update system with feedback. Just in the information system, the transfer of the necessary files to the remote servers of the company using rsync was already implemented.
the hash sum is needed to compare with the hash sum recorded in the update system service database, thus to find out if the correct version of this or that 1c report, for example, in the branch.
upd: Can you advise another utility that would cope with a similar task if you ask it? (there is always an option to write your own, but I would like to leave great for later)
upd: And if you try to give, to a remote rsync server, a file, and if it has one, will it not return something like "I already have it to her, no transfer is necessary"? This would essentially be a solution to the problem, since most likely rsync compares by hash sums, and in this case it would be possible to understand that everything is OK, and if not, then we, firstly, know about it, and secondly, immediately we transfer the correct files.
Currently, the nodejs server sends files using the rsync package; it looks like this:
var Rsync = require('rsync'); // Build the command var rsync = new Rsync() .shell('ssh') .flags('az') .source('/path/to/source') .destination('server:/path/to/destination'); // Execute the command rsync.execute(function(error, code, cmd) { // we're done }); 
hashneeded toсравнитьwith the hash recorded in the update system serviceбд, thus finding outверная ли версияthis or that 1c report, for example,в филиале. - Vyacheslav Danshin