Instructions
UM-0085-B09 DT80 Range User Manual Page 106
RG
FTP Server
The DT80 is also able to unload data to files on a remote server, using FTP (File Transfer Protocol).
An FTP transfer is initiated by specifying an FTP Uniform Resource Identifier (URI) as the value of the
dest= option.
This URI has the form:
ftp://username:password@host-ip:port/pathname?priority=priority&interface=interface
where:
• username is the user name to use when logging in to the FTP server
• password is the password to use when logging in to the FTP server
• host-ip is the IP address of the computer running the FTP server. This may be specified in numeric form (e.g.
192.168.1.23), or as a domain name (e.g. ftp.datataker.com).
• port is the TCP port number to use – optional, default is port 21.
• pathname is the path (and, optionally, filename) into which to write the unloaded data.
• priority is optional and is either
normal (default) or low. A normal priority unload will immediately trigger a
communications session if one is not already active, while a low priority unload will be queued until a session
next becomes active. This option is only applicable if the internal modem is being used. For Ethernet, the
priority is always
normal.
• interface is applicable to DT8xM models only, and specifies the network interface to use:
modem (default), or
ethernet. For models without internal modem, Ethernet is always used and this option is ignored.
For an FTP transfer, the destination folder(s) are created in the same way as for a local unload. For example:
COPYD job=CAT9 dest=ftp://harryp:snitch@ftp.hsww.edu/transfig/
In this example, the DT80 will log in to the FTP server ftp.hsww.edu using the username harryp and the password
snitch, create the folder /transfig/CAT9, then unload all data for the CAT9 job to a file such as
002_20100314T090500.CSV in that folder.
If an explicit filename is specified then data will be written to that file, e.g.
COPYD dest="ftp://harryp:snitch@ftp.hsww.edu/transfig/my data.csv"
See Communications Sessions (P222) for more details about how FTP transmission is managed.
Note: When retrieving logged data by unloading it to an FTP server there must be sufficient space available on the DT80 internal flash
drive to create a temporary file prior to sending to the server. The space required will depend on the amount of data being unloaded. If
you unload the entire contents of a 10MB storefile to FTP in DBD format then you will need 10MB free for the temporary file. If you
unload in CSV format then the space required will be of the order of 10MB, but may be less or more depending on the data values.
The unload data file will be queued for transfer using a communications session. The configured unload priority (
normal or low)
determines whether or not a communications session will be immediately started in response to the unload.
Note: No more than 12 FTP transfers can be queued; any subsequent attempts will be discarded (a message will be written to the event
log, and the
start=new pointer will not be updated, so the next unload will contain additional data).
Also that:
• The DT80 always uses passive mode FTP transfers. Passive transfers are less likely to cause problems with
network firewalls.
• If there are special characters, e.g.
@ in the username or filename parts of the URI then they must be escaped,
i.e. replaced by a special numeric sequence (
% followed by the character's ASCII code, in hexadecimal). @
characters should threfore be replaced with
%40, e.g if your FTP username is lucy@cows.org then this would
be specified as:
dest=ftp://lucy%40cows.org:m00@ftp.cows.org/bovine23/
If there are spaces in the URI then then entire URI should be enclosed in quotes, as in the above example. Alternatively,
space characters can be escaped by replacing them with
%20.
See URI Escape Characters (P108) for more details.