[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sheflug] ftp large file upload problem



On Wed, 2003-12-10 at 17:58, Denis Nikitin wrote:
> Gary Stimson wrote:
> 
> > At 17:43 10/12/2003 +0000, you wrote:
> > 
> >> Is it possible to deffer creation of a file on ftp server
> >> until upload is finished?
> >> Other process is picking up that file (as it should) when it's 
> >> 'halve-done' (should not) and
> >> it's creating all sort of problems later on.
> > 
> > 
> > One simple approach: if the other process is looking for a specific 
> > filename, then upload under a different name then rename (FTP command 
> > 'rename') after upload has finished.
> Impossible.
> Customer is synchronizing his archive with our ftp server and won't 
> rename files (already asked him :)) as there are too may of them already.
> Denis.
> 
I assume that it is your process that it picking the files up to early.
Then you might get a listing of file sizes then wait for 10 seconds or
so and only process the files that have not changed size in that time.
Or just look at the mtime of the file and only process those that have
not been modified in the last 30seconds  or more depending on what you
require. It will still be a bit hit and miss. You might be able to get
something from the ftp logs if you crank up the level of logging then
look for completed uploads on files and only process those. The best and
simplest approach is the rename as suggest above, tried and tested.
Perhaps they could upload all thier files to a diffirent dir then rename
the whole dir when completed.

Hope my ramblings give some help???

john

___________________________________________________________________

Sheffield Linux User's Group -
http://www.sheflug.co.uk/mailfaq.html

  GNU the choice of a complete generation.