Answer the question
In order to leave comments, you need to log in
File system events via ftp
I ask you to help with advice dear habrosoobshchestvo.
There is such a task: to monitor the folder for the appearance of new files. Those. as soon as a new file appears in the folder, we run the script to copy this file to the local folder. The nuance is that the folder is located on a remote server, and access there via ftp. Is it feasible in principle (practically unlimited in funds)?
Thanks in advance to all who respond.
Answer the question
In order to leave comments, you need to log in
Do you need it immediately after the appearance? wget won't run once a minute?
Can't install the software on the server? I would swap client and server roles in this case.
And yes, there is a problem of underwritten files. Someone uploads or copies a file locally on the server to a monitored folder. The file will be "changed" permanently. How do you at least theoretically propose to determine only with the help of the client to track the fact of uploading a file? Without tracking xferlog on the server, no way.
lftp can synchronize a remote directory with a local one.
Here is a good example - serverfault.com/questions/24622/how-to-use-rsync-over-ftp
Some ftp servers are able to call a predefined script at the end of a file upload. Here you need to look at which server is being used.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question