Manual:Tools/Fetch: Difference between revisions

From MikroTik Wiki
Jump to navigation Jump to search
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ ... }}
{{ ... }}
{{Versions|v3, v4}}


== '''Fetch''' ==
<div class=manual>
 
<h2>Summary</h2>
<p><b>Sub-menu:</b> <code>/tool fetch</code></p>
<p><b>Standards:</b> <code></code></p>
<br />
<p>


Fetch is one of the console tools in Mikrotik RouterOS. It is used to copy files from the network device to a Mikrotik.
Fetch is one of the console tools in Mikrotik RouterOS. It is used to copy files from the network device to a Mikrotik.
   
   
First of all, you need to open the console and type:
<h2>Properties</h2>
<pre>tool> fetch</pre>


Command '''Fetch''' has several arguments. They are :
<table class="styled_table">
:<li><b>address</b> - IP address of the device to copy from
<tr>
:<li><b>dst-path</b> - Title of the input file and file path.  
  <th width="40%">Property</th>
:<li><b>host</b> - Domain name or virtual domain name (if used on web-site, from which you want to copy information). For example,
  <th >Description</th>
</tr>
<tr>
    <td><var><b>address</b></var>(<em>string</em>; Default: <b></b>)</td>
    <td>IP address of the device to copy from.</td>
</tr>
<tr>
    <td><var><b>dst-path</b></var>(<em>string</em>; Default: <b></b>)</td>
    <td>Title of the input file and file path.</td>
</tr>
<tr>
    <td><var><b>host</b></var>(<em>string</em>; Default: <b></b>)</td>
    <td>Domain name or virtual domain name (if used on web-site, from which you want to copy information). For example,
<pre>address=wiki.mikrotik.com host=forum.mikrotik.com</pre>
<pre>address=wiki.mikrotik.com host=forum.mikrotik.com</pre>
In this example the resolved ip address is the same (66.228.113.27), but hosts are different.  
In this example the resolved ip address is the same (66.228.113.27), but hosts are different.</td>
:<li><b>keep-result</b> -(''options = yes|no, default - yes''). If yes, creates an input file.
</tr>
:<li><b>mode</b> -(''options = ftp|http, default - http''). Choose the protocol of connection - http or ftp.
<tr>
:<li><b>user</b> - User name, which is needed to login the remote device.  
    <td><var><b>keep-result</b></var>(<em>yes|no</em>; Default: <b>yes</b>)</td>
:<li><b>password</b> - Password, which is needed to login the remote device.  
    <td>If yes, creates an input file.</td>
:<li><b>port</b> - Connection port.
</tr>
:<li><b>src-path</b> Title of the remote file you need to copy.
<tr>
    <td><var><b>mode</b></var>(<em>ftp|http|tftp</em>; Default: <b>http</b>)</td>
    <td>Choose the protocol of connection - http, ftp or tftp.</td>
</tr>
<tr>
    <td><var><b>user</b></var>(<em>string</em>; Default: <b></b>)</td>
    <td>User name, which is needed to login the remote device.</td>
</tr>
<tr>
    <td><var><b>password</b></var>(<em>string</em>; Default: <b></b>)</td>
    <td>Password, which is needed to login the remote device.</td>
</tr>
<tr>
    <td><var><b>port</b></var>(<em>integer</em>; Default: <b></b>)</td>
    <td>Connection port.</td>
</tr>
<tr>
    <td><var><b>src-path</b></var>(<em>string</em>; Default: <b></b>)</td>
    <td>Title of the remote file you need to copy.</td>
</tr>
</table>
 
The following example shows how to copy the file with filename "conf.rsc" from device with ip address 192.168.88.2 by FTP protocol and save it as file with filename "123.rsc". User and password are needed to login into the device.  
The following example shows how to copy the file with filename "conf.rsc" from device with ip address 192.168.88.2 by FTP protocol and save it as file with filename "123.rsc". User and password are needed to login into the device.  
<pre>[admin@mt-test] /tool> fetch address=192.168.88.2 src-path=conf.rsc  
<pre>
[admin@mt-test] /tool> fetch address=192.168.88.2 src-path=conf.rsc  
user=admin mode=ftp password=123 dst-path=123.rsc port=21  
user=admin mode=ftp password=123 dst-path=123.rsc port=21  
host="" keep-result=yes </pre>
host="" keep-result=yes
</pre>
 
<nowiki>[</nowiki>[[#content|Back to Content]]<nowiki>]</nowiki>
 
[[Category:Manual]]
[[Category:Unfinished]]

Revision as of 15:39, 11 March 2010

(needs editing)

Version.png

Applies to RouterOS: v3, v4

Summary

Sub-menu: /tool fetch

Standards:


Fetch is one of the console tools in Mikrotik RouterOS. It is used to copy files from the network device to a Mikrotik.

Properties

Property Description
address(string; Default: ) IP address of the device to copy from.
dst-path(string; Default: ) Title of the input file and file path.
host(string; Default: ) Domain name or virtual domain name (if used on web-site, from which you want to copy information). For example,
address=wiki.mikrotik.com host=forum.mikrotik.com
In this example the resolved ip address is the same (66.228.113.27), but hosts are different.
keep-result(yes|no; Default: yes) If yes, creates an input file.
mode(ftp|http|tftp; Default: http) Choose the protocol of connection - http, ftp or tftp.
user(string; Default: ) User name, which is needed to login the remote device.
password(string; Default: ) Password, which is needed to login the remote device.
port(integer; Default: ) Connection port.
src-path(string; Default: ) Title of the remote file you need to copy.

The following example shows how to copy the file with filename "conf.rsc" from device with ip address 192.168.88.2 by FTP protocol and save it as file with filename "123.rsc". User and password are needed to login into the device.

[admin@mt-test] /tool> fetch address=192.168.88.2 src-path=conf.rsc 
user=admin mode=ftp password=123 dst-path=123.rsc port=21 
host="" keep-result=yes

[Back to Content]