Y
Y
Yuri2012-10-15 15:42:41
linux
Yuri, 2012-10-15 15:42:41

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

7 answer(s)
J
J_o_k_e_R, 2012-10-15
@J_o_k_e_R

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.

J
jov, 2012-10-15
@jov

inotify / inotify-tools

D
Duron700, 2012-10-15
@Duron700

allwaysync.com/ - can copy from ftp

R
relgames, 2012-10-15
@relgames

Head-on option - poll the ftp server every second, copy new files

0
029ah, 2012-10-16
@029ah

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

A
Alexey Akulovich, 2012-10-16
@AterCattus

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.

A
aqwAntonio, 2013-02-05
@aqwAntonio

rsync-?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question