Could rsync help solve this file transfer problem?

Nick Wormald n.wormald at pindar.com
Fri Aug 15 00:27:13 EST 2003


Hi,

I have a problem that I think rsync might be able to help solve:

On a windows NT machine a process P1 is running which is
creating files in a folder E:\output
The files are typically fairly small, e.g. approximately
50 KB and process P1 may create in the order of 10,000 files
a day. The files are created at a fairly constant rate throughout 
the day

On a unix server another process P2 is running, monitoring 
a folder /import/input for files. When a file turns up
in  /import/input process P2 waits until the file is
"stable" (e.g. checks the file size hasn't changed in the last 10
seconds). When process P2 thinks the file is stable it processes the file
and then deletes the file from /import/input.

I need a way of picking up "stable" files from E:\output on the PC
and transferring them to /import/input on the unix server.
After a successfull file transfer I'd want to delete the original
file from E:\output. This all needs to happen in real time.
I.e. I can't just wait till midnight and transfer all 10,000 files
in one go. E.g. if a file turns up in E:\output on the PC at 4pm
I need the file transferred over to the unix server as soon as possible.

Do you think rsync could help provide a solution to this problem?

If so what benefits would it give me over plain old rcp?

Would I have to write a wrapper script to call rsync e.g. once every 
minute of the day. Looking through the docs it doesn't seem possible 
to get rsync to run constantly and monitor a folder for changes?

Also had a quick look at Unison (http://www.cis.upenn.edu/~bcpierce/unison)
but this also seems to be designed to be run once to synchronize two systems.
I suppose I could write a wrapper script to e.g. run unison every minute?

Thanks in advance for any advice you can offer,

Nick




**********************************************************************
This email and its attachments are intended for the above 
named only and may be confidential.  If they have come to 
you in error, you must take no action based on them, nor 
must you copy or show them to anyone; please reply to this 
email and highlight the error.
Security Warning: Please note that this email has been 
created in the knowledge that the internet email is not a 
100% secure communications medium.  We advise that you 
understand and observe this lack of security when emailing us.
Viruses:  Although we have taken steps to ensure that this 
email and attachments are free from any virus, we advise 
that in keeping with good computing practice the recipient 
should ensure they are actually virus free.
If you have received this email in error please notify:
postmaster at pindar.com
**********************************************************************




More information about the rsync mailing list