Mikrotik Fetch Tool is one of the tools on the console/terminal Mikrotik RouterOS that works to copy (copy) files through FTP, HTTP, and https protocol. This Fetch tool can copy files from other devices to Mikrotik Router (download) or copy files from Mikrotik Router to other devices (upload). So its use is similar like wget on linux, with the different command.
Until RouterOS version 6.38.1, Mikrotik fetch tool still no fetch menu in its Winbox GUI. So to use this fetch tool we still have to type the command on Mikrotik terminal. It does not matter because the use of his command will be discussed one by one in this Mikrotik Tutorial until easy to understand.
Tutorial How to Use Fetch Tool on Mikrotik
Although this fetch tool only runs on console/terminal, I suggest to log in using Winbox Mikrotik to be easier in its application.
Open Mikrotik Terminal. Here I will give some examples of applying the Mikrotik fetch tool.
- An example of using Mikrotik Fetch Tool to download files from FTP Public folder
Here I will example to download file mikrotikindo.rsc from Public folder / Mikrotik on FTP. Given FTP folder used is Public, so we do not need to enter the username and password FTP in command Mikrotik fetch.
Here is an example of the Mikrotik Fetch Tool Fetch command for the Public FTP folder:
tool fetch address = ip.address.ftp src-path
= directory.file.ftp mode = ftp dst-path
= directory. destination port = 21 keep-result = yes
Please replace the marked Bold according to your data. For more details see the following picture:
over, the status parameter: finished, it means that the file in FTP has been successfully downloaded to the Mikrotik Router. We can see the file downloaded on the Files menu:
- Example Use of Mikrotik Fetch Tool to upload files from Mikrotik to FTP Public folder
To upload a file to the FTP Public folder, its command as follows:
tool fetch address = ip.address.ftp src-path = directory.file.router mode = ftp port = 21 upload = yes
For more details can see examples of the following images:
After the upload is complete which is marked with the status parameter: finished, try checking his FTP folder if the uploaded file has been successfully logged in.
Example of Using Mikrotik Fetch Tool to download files from FTP folder non Public
This example is similar to example number 1, except the folder / FTP directory used instead of public folder but other folders that need certain username and password to download and upload its file. This example can also be applied to an FTP that does not have a public folder and does have to enter a username and password for its login.
I example download the file from FTP in MikrotikIndo directory with winbox.exe file name
Here is an example of the Mikrotik Fetch Tool command for FTP with username & password:
tool fetch address = ip.address.ftp src-path = directory.file.ftp mode
= ftp port = 21 user = user.ftp password = password.ftp
For more details please see the following picture:
The results are as follows:
- Example of Using Mikrotik Fetch Tool to Download files from Website
In this example, there are 4 methods I will example to download files from the website using Mikrotik Fetch Tool. Due to fetch download from the website we can use several different parameters, namely address, host, and URL. In addition, I will also example download files from websites with SSL / HTTPS encryption. 4.1. Use of Address Parameters in Mikrotik Fetch Tool to Download File from Website (HTTP) Address Parameter in Mikrotik fetch tool can be filled with IP Address or certain website domain. To be able to download from HTTP website, then in mode parameter filled with mode = HTTP. Examples of its usage:
tool fetch address = ixp.mikrotik.co.id src-path = /download/nice.rsc mode = http
- Use of Address and Host Parameters in Mikrotik Fetch Tool to Download File from Website (HTTP)
In some cases, there are websites that can not fetch with address parameter only, because the location of the website is in the certain host in the IP address of the website. To fix this, can add the host parameters. Examples of its usage:
tool fetch address = rizkyagung.net host = rizkyagung.net src-path = winbox.exe dst-path = winbox.exe mode = http
- Use of Url Parameters in the Mikrotik Fetch Tool to Download Files from the Website (HTTP)
For the use of fetch tools in the previous 2 examples, I think it is too complicated. To be more simple, we can use the URL parameter. The condition we must know the full path URL file in fetch. Examples of its use as follows:
tool fetch url = “http://rizkyagung.net/winbox.exe” mode = http
- Use Url Parameters in Mikrotik Fetch Tool to Download File from Website (https)
What if his website uses https encryption? Still can, how to use mode = https. Example :
tool fetch url = ” https://download2.mikrotik.com/routeros/winbox/3.11/winbox.exe ” mode = https
Quite so many times the discussion about his Mikrotik Fetch Tool. In the next article, I will share the application of Fetch Tool to backup & export Mikrotik configuration automatically to FTP Server.