Aug 23, 2013, 6:38 AM
Post #3 of 3
Are the ftp uploads being done as a get or as a put i.e., is the upload initiated by a process on this server or from another server?
Re: [tbalz] Copy file from ftp directory after successful upload
[In reply to]
A common approach for this task is to have your script poll the upload dir for new files. If found, it will then poll every X seconds the file size of each file to see if it's growing. The upload is compete once the size stops growing, but that doesn't mean that it was successful. This is the point where you parse /var/log/xferlog to find that answer and then move or delete the file based on that status.
Do you have a test script that you're developing? If so, you should post it and provide detailed info on how it failing to accomplish the task and include any/all errors and warnings it produces.