fetch FTP - empty file uploaded

I’ve made a script which is saving data amounts of each user to logfile at midnight and then uploading the logfile to my web server using /tool fetch and FTP. (web server is generating tables, see attachment) The problem is that sometimes the logfile is transferred well and sometimes not - the transferred logfile is empty (zero length).

I’ve also tried simple command in terminal:

/tool fetch upload=yes mode=ftp address=SERVER user=USER password=PASS src-path=test.txt dst-path=test.txt

And it is as I said: sometimes working, sometimes not. There is no error message on terminal, everything seems to be ok (status: finished), but the file on FTP is empty. How may I fix it?
data-table.png

Hi zervan,

I have noticed the exact same problems with my script sometimes it uploads the whole file and other times its a zero sized file.

I have now done this:
/tool fetch mode=ftp address=($ftpserver) user=rbcp password=rbcp src-path=($rscFileName) dst-path=($rscFileName) upload=yes;
:delay delay-time=3s;

I’ve added a slight delay of 3 seconds to see if this helps somehow.

I’ll let the system run for the next 24 hours and see it goes.

Regards,
/Neji

or may be you can setup a linux server and put crontab let the server get the file from you routerboard…

I changed the FTP service from Windows to Ubuntu and so far its working.

No more zero sized files and the right sized file does get FTP’d to the server.

I have the same problem - emty file uploaded to Ubuntu FTP server. Fromm command line - is OK. From the script - is 0Bytes :frowning: Have You found solution? Where is the problem?

My problem was that I was using a Windows FTP server and some how the anti virus was messing things up. But when I moved to a Ubuntu server then it worked just right