Script on 6.41RC - fetch not working

Hello,
Sorry for my bad English.
I need an advice. My script is not working at 6.41RC on 6.40 OK.
Export to flash drive is OK but fetch to FTP is not working.
Mikrotik Log: ftp backup error: xxxxxxx

Log on my local FTP server. Address 192.168.1.1 login OK, but no write backup:




:local hostname "RB962_Fug8";
:local ftpusername "name";
:local ftppassword "password";
:local ftpserverip "192.168.1.2";
:local ftpserverport "21";

:local time [/system clock get time];

# months array
:local months ("jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec");

# extract month from date
:local datemonth [ :pick [/system clock get date] 0 3 ];

# get position of our month in the array = month number
:local mm ([ :find $months $datemonth -1 ] + 1);

# if month number is less than 10 (a single digit), then add a leading 0
:if ($mm < 10) do={
   :set datemonth ("0" . $mm);
# otherwise, just set it as the number
} else={
   :set datemonth $mm;
}

#create date format  dd_mm_yyyy
:local date ([:pick [/system clock get date] 4 6]."_". datemonth ."_". [:pick [/system clock get date] 7 11]);

:local filename "$hostname-$date-$time";

:log warning "ftp backup start: disk1/$filename.rsc";
/export file="disk1/$filename";

:local backupfile ("BackupMikrotik/" . filename . ".rsc");
:do {
  /tool fetch mode=ftp address=$ftpserverip port=$ftpserverport user=$ftpusername password=$ftppassword src-path="disk1/$filename.rsc" dst-path=$backupfile upload=yes;
   :log info "ftp backup OK: $backupfile";
} on-error={
   :log error "ftp backup error: $backupfile";
}

:delay 2s;
#/file remove "$filename.rsc"

Any solution?

Have you tried running the “/tool fetch” command manually? Does it work? If not - can you put the output here?

It doesn’t work manually too.

With filezilla it works.

status: failed

failure: connection timeout

Hello,

Same problem here with 6.43.8. FTP server is “The Dude”
It works with fileZilla and WinSCP (ftp mode), but tool fetch doesn’t works. It give to me “status: failed” ans “failure: connection timeout”
This is my command : /tool fetch address=x.x.x.x src-path=myscript.auto.rsc user=ftpuser mode=ftp password=ftppassword dst-path=myscript.auto.rsc port=21 keep-result=yes

Vincent

Hello,
I found what’s going wrong for me : Mikrotik tried to fetch script through public network gateway to resolve a private IP for the server which is on another site and connected with a VPN.
I opened a TFTP with a public IP.

Vincent