Script

FTP

The professional tool to automate FTP, SFTP, FTPS

and schedule FTP batch jobs

MENU MENU
Post here if you experience file transfer problems or unexpected errors.
I've been checking this app out because I thought the idea was nifty, but it seems to have a real problem when it comes to uploading lots of files or large files..

I've written a loop to SYNC a directory using UPLOAD_DELETE
and on different files at different times it fails to fully upload, and or fully sync..

Now I've set the script to simply loop, but all this does is start the process over to reach the same result...

30 hours have passed on this app trying to upload a 295MB Word document to the server..

I've searched through the forums for similar situations to see if anyone has reached a sound solution, and it doesn't appear like a problem for most people -- I guess those who have reported the error are using it as robustly as I'm trying.. But I followed the suggestions therein; Enabling Verbose kind of gave me more insight into what was going on, but disabling PASSIVE MODE did nothing..

//========================================================================
CWD ..
250 CWD command successful
PWD
257 "/public_html/data/reports" is the current directory
CWD 10312014
250 CWD command successful
PWD
257 "/public_html/data/reports/10312014" is the current directory
PASV
227 Entering Passive Mode (X,X,X,X,80,188)
Opening data connection to X.X.X.X Port: 20668
MLSD
150 Opening BINARY mode data connection for MLSD
388 bytes transferred. (12.2 KB/s) (31 ms)
226 Transfer complete
Deleting (remote file is orphan) 10312014/my_report.doc.part
DELE my_report.doc.part
250 DELE command successful
Uploading (remote file not found) 10312014\my_report.doc
DELE my_report.doc.part
550 my_report.doc.part: No such file or directory
PASV
227 Entering Passive Mode (X,X,X,X,128)
Opening data connection to X.X.X.X Port: 55936
STOR my_report.doc.part
150 Opening BINARY mode data connection for my_report.doc.part
204969984 bytes transferred. (284 KB/s) (00:11:43)
Server closed connection
***** SYNC Error #16023: Connection closed.
Error sync'ing REPORTS data.. Exiting
//========================================================================

Then the script starts over, only to reach the same result... I've tried enabling Mode Z, it's not supported on my server..

I tried uploading the files through FileZilla, and I have no problem..

Now correct me if I'm wrong but I was under the impression ScriptFTP had resume support, but it doesn't seem so.
If you notice, it detects the "my_report.doc.part" and deletes it as an orphan file, then recreates it upon upload...

I'm disabling the TEMP uploadmode and am now going to use SETUPLOADMODE(DIRECT).. However the documentation for ScripFTP states that "Uploading files with DIRECT mode is not recommended." I'm a little scared by that and its description but I don't seem to have much of a choice here. Keeping in mind that I'm using SYNC, I'm hoping that a file comparison will be made first, as the documentation for SYNC suggests, and that the file won't be re-uploaded and thus, overwritten..

I noticed that FileZilla doesn't change the name of the file when uploading. My idea is that once the connection drops, it'll reconnect and instead notice the uploaded file, which should have been completed, as this wouldn't be labeled a temporary file with the .PART extension.

However, one of my concerns is whether or not the only "sync" check for the uploaded file is the "date modified", and not a "file size" check or some kind of MD5 check of sorts. If the connection drops DURING the upload and the file on the server is now HALF the data/size (for example), I wouldn't want it to report a false positive for a successful sync once it reconnects and re-scans the directory.

I figured I'd report my findings and such to anyone else coming across these forums who may have found themselves in such a predicament, and I welcome the advice and support of the admins or anyone who can chime in with regard to a solution..

Jacob