I am looking for a module for Node.js - preferably available through npm that can sync files with an FTP server. The ftp module has all the basic functions, but writing a full blown sync system on top of it seems like a lot of work.
I'm the author of jsftp. It should be easy to sync through it simply walking through the directories you want to upload. Jsftp can handle parallel passive requests (internally they are still sequential, but you don't have to worry about it), so you could just use sequential ftp.put
calls and it should work without much scripting effort on your side.
Even better and more idiomatic in node would be to use the yet to be documented ftp.getPutSocket
method, which allows you to get the raw PASV
socket and just push into it (using streams, for example). For a particular example of this case, you can look at how vfs-ftp does it.
Feel free to contact me if you need more help with implementing the syncing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With