Community discussions

MikroTik App
 
User avatar
vmiro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Sun Jan 29, 2006 6:53 pm

Fetch upload, bad file size...

Wed Apr 10, 2013 12:25 pm

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 :(
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 ;)

mIRO
 
janreges
just joined
Posts: 10
Joined: Mon Aug 27, 2012 8:52 pm

Re: Fetch upload, bad file size...

Sun Apr 14, 2013 4:27 pm

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.
 
janreges
just joined
Posts: 10
Joined: Mon Aug 27, 2012 8:52 pm

Re: Fetch upload, bad file size...

Sun Apr 14, 2013 5:44 pm

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).
 
User avatar
vmiro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Sun Jan 29, 2006 6:53 pm

Re: Fetch upload, bad file size...

Mon Apr 15, 2013 1:37 pm

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
 
User avatar
vmiro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Sun Jan 29, 2006 6:53 pm

Re: Fetch upload, bad file size...

Tue Apr 30, 2013 9:35 am

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
 
nevimjmeno
just joined
Posts: 2
Joined: Mon May 13, 2013 12:56 pm

Re: Fetch upload, bad file size...

Mon May 13, 2013 1:00 pm

I had the same problem. I don't know what the problem was exactly with proftpd, but with VSFTP it worked.
 
User avatar
vmiro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Sun Jan 29, 2006 6:53 pm

Re: Fetch upload, bad file size...

Mon May 13, 2013 2:14 pm

The files are incomplete with Windows 2003 Server, FTP Server also... :(

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
 
nevimjmeno
just joined
Posts: 2
Joined: Mon May 13, 2013 12:56 pm

Re: Fetch upload, bad file size...

Mon May 13, 2013 2:24 pm

Yes, I know that. With ProFTP it is behaving exactly how you described. With vsftp it works good. 100% completed transfers Try vsftp!
 
User avatar
vmiro
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 72
Joined: Sun Jan 29, 2006 6:53 pm

Re: Fetch upload, bad file size...

Fri May 17, 2013 11:29 am

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 ;)

Thanks nevimjmeno ;)

Who is online

Users browsing this forum: MSN [Bot] and 112 guests