Fetch upload, bad file size...

I’m using fetch command to upload MT configuration every 15 days on more than thirty routers.
I wrote a script for creating a backup file, set up the scheduler…so, everything is automated.

The problem is that the backup file isn’t transferred in whole. I tried several times to upload backup file to FTP server and I got different sizes of the same file, and non of them is as it should be :frowning:
I tried with ascii=no/yes (probably binary/ascii?), with Windows server FTP server and ProFTPd (Centos linux).
This type of file should be transferred in binary mode. Does ascii=no option activate binary mode?
I tried with just typing fetch command in CLI (to eliminate possible script error):

/tool fetch address=192.168.100.1 user=ftpuser password=ftppass dst-path=mikrotik.backup
src-path=sv-mt-09062012-1336.backup mode=ftp upload=yes

but the result was the same.

I’m using RouterOS ver. 5.20 and above on RB750.

If anyone had a similiar problem, please respond :wink:

mIRO

Hi.

I have the same problem.

We have 3 routerboards in different datacenters.

2x routerboard (RB750G) with RoS 5.11 are working fine (each uploaded export file to FTP is OK - whole)
1x routerboard (Rb493G) with RoS 5.24 doesn’t work properly (uploaded files to FTP are incomplete).

Our scheduled export script (generates export.rsc) has delay 5s before/after export command and also before/after /tool fetch.

In extended proftpd log i see, that when file is incomplete, is missing “STOR” command and in log. Last is “PASV” command.

I verified, that generated export.rsc is always with same content (except datetime in header). Problem must be in /tool fetch mode=ftp in RoS > 5.11.

Thank you for help.

Also, after upgrade to RoS 6.0rc13, problem persists.

Sometimes “tool fetch” upload whole file (42 516 bytes), sometimes not (40 648 bytes, 41 996 bytes, 41 788 bytes).

I tried with 4.17, and it seems everything is ok…
Any solution? How to automate configuration backup to remote FTP server…with “RoS > 5.11”?

mIRO

Is there any chance that this problem could be solved in next 5.x or 6.x release ?

The “fetch upload” option is very useful for automated backup or storing log files in remote location…


mIRO

I had the same problem. I don’t know what the problem was exactly with proftpd, but with VSFTP it worked.

The files are incomplete with Windows 2003 Server, FTP Server also… :frowning:

Try sending several times…somethimes I got file with correct size, but mostly it’s incomplete…generally, we can’t rely on this 100%…


mIRO

Yes, I know that. With ProFTP it is behaving exactly how you described. With vsftp it works good. 100% completed transfers Try vsftp!

You are right. With vsftp the transffered files are complete.
vsftp is a lot simplier FTP server than ProFTP and Win FTP. These two have a lot more options that probably needs fine tuning to get it work…

All in all, the solution is vsftp :wink:

Thanks nevimjmeno :wink: