URGENT: Tricky rsync problem
Craig A. Sharp
csharp2a at adni.net
Tue Mar 26 05:48:54 EST 2002
Here is the problem that I need to solve:
I have an ftp server that I wish to rsync the files from a directory on the remote server to a local server and then when the files are complete, move them to a public directory on the local server.
To move the files from the remote server, I successfully tried using the following command:
rsync -avz ftp.servername.com::roush/inbound/* /localserver/directory
I am running this command from the local server. The command is correctly moving the files from the remote to the local server. I am not sure I am using the correct switches but it is working.
Here are the problems that I need to solve:
1. The rsync command must update the local files based on a cron entry every two minutes. I can do this. I need to be sure though, that rsync is updating the files with new data.
In other words, if the file is still coming into the ftp server, I need rsync to move the additional data across to the local server until the file is complete.
2. Once the files exist on the local server, the files need to be moved into a public directory for local access, again via cron (the local rsync directory is separate from the public directory). I envision running rsync again with new parameters for the local move.
Here is the issue at this point. I do not want to move the files to the public directory unless they are complete. The end user (public directory) must never see an incomplete file.
I am a beginner at rsync and would appreciate any help with this problem.
Craig A. Sharp
Unix Systems Administrator
Roush Industries, Inc.
-------------- next part --------------
HTML attachment scrubbed and removed
More information about the rsync