29.11.2012 Views

JADE Documentation (PDF) - SOS-Berlin

JADE Documentation (PDF) - SOS-Berlin

JADE Documentation (PDF) - SOS-Berlin

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Software- und Organisations-Service GmbH<br />

Managed File Transfer<br />

<strong>SOS</strong>FTP<br />

<strong>Documentation</strong><br />

Technical Manual<br />

23 July 2010<br />

Software- und Organisations-Service GmbH 23 July 2010


<strong>SOS</strong>FTP <strong>Documentation</strong> 2<br />

1 Yet another File Transfer Client? ..........................................................................................................3<br />

2 Installation ............................................................................................................................................4<br />

2.1 Overview........................................................................................................................................... 4<br />

2.2 Software Requirements..................................................................................................................... 5<br />

2.3 <strong>SOS</strong>FTP Client ................................................................................................................................. 5<br />

2.4 <strong>SOS</strong>FTP Server ................................................................................................................................ 6<br />

2.5 Web GUI........................................................................................................................................... 7<br />

2.6 <strong>SOS</strong>FTP Reporting ........................................................................................................................... 9<br />

3 Architecture ........................................................................................................................................10<br />

3.1 <strong>SOS</strong>FTP Client ............................................................................................................................... 10<br />

3.1.1 Simple Transfer........................................................................................................................... 10<br />

3.1.2 Jump Transfer............................................................................................................................. 11<br />

3.1.3 Log Output.................................................................................................................................. 12<br />

3.2 <strong>SOS</strong>FTP Server and Web GUI ........................................................................................................ 13<br />

3.2.1 Importing the Transfer History ..................................................................................................... 14<br />

3.2.2 Quick View with the Web GUI ..................................................................................................... 16<br />

3.3 <strong>SOS</strong>FTP Reporting ......................................................................................................................... 17<br />

4 Use Cases Client................................................................................................................................18<br />

4.1 Configuration with Profiles............................................................................................................... 18<br />

4.2 Simple Transfer............................................................................................................................... 19<br />

4.3 Install Operation.............................................................................................................................. 23<br />

4.4 Jump Transfer................................................................................................................................. 24<br />

4.5 Polling for files................................................................................................................................. 27<br />

4.6 Logging........................................................................................................................................... 28<br />

4.6.1 Transfer Log ............................................................................................................................... 28<br />

4.6.2 Transfer History .......................................................................................................................... 28<br />

4.7 Dynamic Password Retrieval........................................................................................................... 30<br />

5 Use Cases Server ..............................................................................................................................31<br />

5.1 History Import.................................................................................................................................. 31<br />

5.1.1 Job Configuration........................................................................................................................ 32<br />

5.1.2 Setting up orders for receiving history files .................................................................................. 35<br />

5.2 Custom Fields ................................................................................................................................. 36<br />

5.2.1 <strong>SOS</strong>FTP Client ........................................................................................................................... 36<br />

5.2.2 Web GUI..................................................................................................................................... 37<br />

5.3 <strong>SOS</strong>FTP Reporting ......................................................................................................................... 39<br />

5.3.1 Configuration .............................................................................................................................. 39<br />

5.3.2 Generating a Report.................................................................................................................... 41<br />

6 Complete Client Parameter Reference................................................................................................44<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 3<br />

1 Yet another File Transfer Client?<br />

<strong>SOS</strong>FTP is a client/server solution for managed file transfer. <strong>SOS</strong>FTP addresses the gaps of individual solutions<br />

that are identified in the fields of implementation, logging and reporting:<br />

� Concretely, the problems with shell script implementations are missing error detection and error handling.<br />

� Additionally, individual shell script implementations result in individually organized configurations that are<br />

hard to maintain.<br />

� Protocols generated by shell scripts are individually arranged. This leads to log files that are hardly understandable<br />

at a first glance. Error states often are not clearly perceivable in such reports.<br />

� There is no central information about the files sent and received per destination and there is no individual<br />

reporting for each destination. There is no overview about the rate of errors produced by file transfers based<br />

on specific shell scripts or destinations.<br />

Therefore, <strong>SOS</strong>FTP implements the following features:<br />

� There is a standard implementation in Java (JRE 1.6 or higher required) for all platforms without any further<br />

installation prerequisites. <strong>SOS</strong>FTP has been tested for Windows 2000/2003/2008/XP/Vista, Solaris, AIX,<br />

HP-UX, Linux and should be operational for additional platforms that are capable of running a JRE.<br />

� The <strong>SOS</strong>FTP client supports the protocols FTP, FTPS 1 (FTP over SSL) and SFTP.<br />

� For all protocols username/password authentication is available and for the SFTP protocol public/private key<br />

authentication is supported.<br />

� In addition to simple file transfer from a client to a server and vice versa within one TCP/IP network it is possible<br />

to transfer files from one host in the intranet through a server in the Demilitarized Zone called “Jump<br />

Host” to another host in the internet and vice versa. Thus it is possible to create a bridge between two independent<br />

TCP/IP networks for direct file transfer.<br />

� Detailed error detection and error handling are supported. The configuration can be organized by command<br />

line and by a configuration file.<br />

� For logging purposes standardized protocols in a structured and configurable format, a history of all transfers<br />

and automated import of the log information into a database are supported. Therefore, network monitors for<br />

automated alerting in case of errors can be easily connected.<br />

� <strong>SOS</strong>FTP provides a Web GUI for constant checking and for the history of file transfers.<br />

� Automated generation of reports, e.g. configurable KPI reports, and their delivery by email are supported.<br />

Advantages<br />

The advantage of the <strong>SOS</strong>FTP logging and reporting capabilities is an increase in efficiency:<br />

� All relevant information about the file transfer history can be stored automatically in a central database.<br />

� Via a graphical web interface (Web GUI) you can see at a first glance the important information on successful<br />

and failed transfers.<br />

� Application Managers do not have to actively survey all protocols. There is no time-consuming searching for<br />

logs that are stored on different remote hosts. No direct access is required to each of those server systems<br />

for Application Managers in order to check the transfer status. No manual log analysis is required.<br />

� Automatically generated log reports provide the relevant information in a compact form.<br />

1 Only implicit FTPS (using a dedicated FTPS port) is supported. Explicit FTPS (Server uses the same port for<br />

FTP and FTPS) is not supported.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 4<br />

� <strong>SOS</strong>FTP can automatically detect errors and will then alert the Application Manager by sending an alert<br />

email.<br />

2 Installation<br />

2.1 Overview<br />

The <strong>SOS</strong>FTP Software contains the following packages:<br />

� <strong>SOS</strong>FTP Client<br />

A Java based FTP/SFTP-Client for Unix and Windows for managed file transfer supporting secured file<br />

transfer between different TCP/IP networks. The <strong>SOS</strong>FTP Client supports the protocols FTP, FTPS 2<br />

(FTP over SSL) and SFTP. This package can be used as a standalone application, it is not dependent<br />

on the other packages.<br />

� <strong>SOS</strong>FTP Server<br />

Add-on for the Job Scheduler. The <strong>SOS</strong>FTP Server collects the information of file transfers processed<br />

by any number of <strong>SOS</strong>FTP Clients. The <strong>SOS</strong>FTP Server manages the information in a database (Transfer<br />

History Database).<br />

� Web GUI<br />

This package supports a quick survey of managed file transfers stored in the Transfer History Database.<br />

The GUI is running as web application in a web browser. This package requires the <strong>SOS</strong>FTP Server.<br />

� <strong>SOS</strong>FTP Reporting<br />

This package supports the automatic generation of reports. The reports contain the summary of information<br />

about managed file transfers. The reports can be automatically send by email. This package requires<br />

the <strong>SOS</strong>FTP Server.<br />

2 Only implicit FTPS (using a dedicated FTPS port) is supported. Explicit FTPS (Server uses the same port for<br />

FTP and FTPS) is not supported.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 5<br />

2.2 Software Requirements<br />

� The <strong>SOS</strong>FTP Client requires JRE 1.6 or higher.<br />

� The <strong>SOS</strong>FTP Server requires JRE 1.6 or higher, a Job Scheduler (http://jobscheduler.sourceforge.net)<br />

and a database to store the file transfer information.<br />

The supported database systems are<br />

- DB2 8.x,9.x<br />

- Oracle 8.1.7, 9.2, 10g.<br />

- SQL Server 2000, 2005, 2008<br />

- Sybase ASE 15<br />

- MySQL 4.1, 5.x<br />

- PostgreSQL 8.x<br />

- Firebird 2.0<br />

� The Web GUI requires a web server e.g. Apache and PHP 4 or PHP 5.<br />

2.3 <strong>SOS</strong>FTP Client<br />

The package <strong>SOS</strong>FTP Client is delivered in the sosftp_client/ directory with the following files and subdirectories:<br />

� doc/ (Directory of the documentation)<br />

o sosftp.xml (<strong>Documentation</strong> of the <strong>SOS</strong>FTP Client)<br />

o sosftp.xsl (Stylesheet for sosftp.xml)<br />

o banner_english.gif (Image for sosftp.xml)<br />

o banner_german.gif (Image for sosftp.xml)<br />

o sosftp.cmd (Startscript for Windows)<br />

o sosftp.sh (Startscript for Unix)<br />

o com.sos.net-1.6-[date]-[svnr].jar (Library containing the relevant Java classes)<br />

o com.sos.settings-1.6-[date]-[svnr].jar (Library containing the relevant Java classes)<br />

o com.sos.util-1.6-[date]-[svnr].jar (Library containing the relevant Java classes)<br />

o com.sos.connection-1.6-[date]-[svnr].jar (Library containing the relevant Java classes)<br />

o com.sos.configuration-1.6-[date]-[svnr].jar(Library containing the relevant Java classes)<br />

o com.sos.xml-1.6-[date]-[svnr].jar (Library containing the relevant Java classes)<br />

o xalan.jar (Third party software component)<br />

o commons-net-1.2.2.jar (Third party software component)<br />

o trilead-ssh2-build211.jar (Third party software component)<br />

o readme.txt (Configuration instructions)<br />

o ThirdParty.txt (Licensing information for third party software components)<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 6<br />

To install the <strong>SOS</strong>FTP Client just copy the sosftp_client/ directory containing files to any directory. In Addition<br />

if you already have a copy of the <strong>SOS</strong>FTP Client you can use the operation install of the <strong>SOS</strong>FTP Client.<br />

This operation creates another default installation of a <strong>SOS</strong>FTP Client. For further information see the chapter<br />

Install Operation.<br />

2.4 <strong>SOS</strong>FTP Server<br />

A regular installation of a Job Scheduler is required. For further information about the installation and configuration<br />

of the Job Scheduler see the documentation about Installation and Configuration at<br />

http://www.sos-berlin.com/doc/en/scheduler_installation.pdf. The <strong>SOS</strong>FTP Server consists of the files mentioned<br />

below. These files are delivered in the directory sosftp_server/scheduler.<br />

To install the <strong>SOS</strong>FTP Server copy the delivered files into the installation directory of your Job Scheduler.<br />

For the files their appropriate paths in the Job Scheduler installation are given where [install_path] is the<br />

installation path of the Job Scheduler.:<br />

� [install_path]/config/live Configuration directory<br />

o scheduler_sosftp_history.job_chain.xml<br />

Configuration file relevant for the Import<br />

o scheduler_sosftp_history.params.xml<br />

Database parameters for the Import Job<br />

o scheduler_sosftp_history_file_order.job_chain.xml<br />

Configuration file relevant for the import<br />

o scheduler_sosftp_history_receive,receive.order.xml_sample<br />

Configuration file relevant for the Receive from <strong>SOS</strong>FTP Client History files<br />

After the conformation rename this file to<br />

scheduler_sosftp_history_receive,receive.order.xml<br />

o scheduler_sosftp_history_receive.job.xml<br />

Receive-Job Configuration<br />

o scheduler_sosftp_history_receive.job_chain.xml<br />

Configuration file relevant for the Receive<br />

o scheduler_sosftp_import.job.xml<br />

Software- und Organisations-Service GmbH<br />

Import-Job Configuration<br />

� [install_path]/db/ (Create table scripts)<br />

o /sosftphistory.sql (Create table scripts)<br />

� [install_path]/files/ (Default directory for transfer history files)<br />

� [install_path]/jobs/ (Job documentations)<br />

o <strong>SOS</strong>FTPHistoryJob.xml (Job documentation of the Import Job)<br />

� [install_path]/lib/ (Directory for the libraries)<br />

o com.sos.ftphistory-1.6-[date]-[svnr].jar (Contains the relevant Java classes)<br />

The <strong>SOS</strong>FTP Server requires a database for importing the transfer history. This does not necessarily have to be<br />

the same database that is used by the Job Scheduler. To install the Transfer History Database execute the appropriate<br />

create table script in your SQL Client. Otherwise if you skip the installation of the Transfer History Database<br />

the Import Job will automatically create the required tables in the Job Scheduler database.


<strong>SOS</strong>FTP <strong>Documentation</strong> 7<br />

Configuration<br />

1. Configure the <strong>SOS</strong>FTP Servers database.<br />

The configuration file scheduler_sosftp_history.params.xml specifies the database parameters that are<br />

used by the Import Job. If the given database does not exist or if this configuration file does not exist then the<br />

Import Job will automatically use the Job Scheduler database which is configured in the setting [install_path]/config/sos_settings.ini.<br />

The <strong>SOS</strong>FTP Server creates the following tables in the Job<br />

Scheduler database:<br />

� <strong>SOS</strong>FTP_FILES<br />

� <strong>SOS</strong>FTP_FILES_HISTORY<br />

� <strong>SOS</strong>FTP_FILES_POSITIONS<br />

2.5 Web GUI<br />

The Web GUI needs access to the Transfer History Database therefore it is dependent on an installation of the<br />

<strong>SOS</strong>FTP Server. Furthermore a web server installation (e.g. Apache) with PHP 4 or PHP 5 is required. The Web<br />

GUI is delivered in the directory sosftp_web/ with the following files and subdirectories:<br />

� custom/ (Contains the configuration file custom.inc.php)<br />

� db/ (Contains database specific files)<br />

� js/ (Contains JavaScript files)<br />

� languages/ (Contains language specific files)<br />

� packages/ (Contains program files)<br />

� quicklist.css (Used cascading style sheet)<br />

� site.css (Used cascading style sheet)<br />

� sosftp_history.php (The main PHP script)<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 8<br />

Install the Web GUI by copying the directory sosftp_web/ with the files shown above in the htdocs/ directory<br />

of your Apache web server. To configure the Web GUI open the configuration file<br />

sosftp_web/custom/custom.inc.php in a text editor.<br />

1. Choose the connection class for your database<br />

2. Choose the database authorization parameters for your database<br />

…<br />

// connection classes for database support (Oracle, SQL Server, MySQL, ...)<br />

# if (!defined('APP_CONNECTION_CLASS'))<br />

#{ define ( 'APP_CONNECTION_CLASS', 'sos_oracle_record_connection' ); }<br />

# if (!defined('APP_CONNECTION_CLASS'))<br />

#{ define ( 'APP_CONNECTION_CLASS', 'sos_mssql_record_connection' ); }<br />

# if (!defined('APP_CONNECTION_CLASS'))<br />

#{ define ( 'APP_CONNECTION_CLASS', 'sos_mysql_record_connection' ); }<br />

# if (!defined('APP_CONNECTION_CLASS'))<br />

#{ define ( 'APP_CONNECTION_CLASS', 'sos_odbc_record_connection' ); }<br />

# if (!defined('APP_CONNECTION_CLASS'))<br />

#{ define ( 'APP_CONNECTION_CLASS', 'sos_pgsql_record_connection' ); }<br />

# if (!defined('APP_CONNECTION_CLASS'))<br />

#{ define ( 'APP_CONNECTION_CLASS', 'sos_db2_record_connection' ); }<br />

# if (!defined('APP_CONNECTION_CLASS'))<br />

#{ define ( 'APP_CONNECTION_CLASS', 'sos_fbsql_record_connection' ); }<br />

# if (!defined('APP_CONNECTION_CLASS'))<br />

#{ define ( 'APP_CONNECTION_CLASS', 'sos_sybase_record_connection' ); }<br />

if (!defined('APP_CONNECTION_CLASS'))<br />

{ define ( 'APP_CONNECTION_CLASS', 'sos_oracle_record_connection' ); }<br />

// database authorization<br />

if (!defined('APP_CONNECTION_AUTH'))<br />

{ define ( 'APP_CONNECTION_AUTH',<br />

'-db=test -user=test -password=test –host=localhost:1521' );<br />

}<br />

?><br />

Start the Web GUI by entering “http://[host:port]/sosftp_web/sosftp_history.php” into the address<br />

bar of your web browser where [host:port] is the host name and port number of your web server installation.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 9<br />

2.6 <strong>SOS</strong>FTP Reporting<br />

A regular installation of a Job Scheduler is required. For further information about the installation and configuration<br />

of the Job Scheduler see the documentation about Installation and Configuration at<br />

http://www.sos-berlin.com/doc/en/scheduler_installation.pdf. <strong>SOS</strong>FTP Reporting needs access to the Transfer<br />

History Database therefore this package is dependent on an installation of the <strong>SOS</strong>FTP Server. <strong>SOS</strong>FTP Reporting<br />

consists of the files mentioned below. These files are delivered in the directory<br />

sosftp_reports/scheduler/. To install <strong>SOS</strong>FTP Reporting copy the delivered files into the installation<br />

directory of your Job Scheduler. For the files their appropriate paths in the Job Scheduler installation are given<br />

where [install_path] is the installation path of the Job Scheduler.:<br />

� [install_path]/config/live (Directory for configuration files)<br />

o jasper_report_sosftp.job.xml (Configuration file of the Reporting Jobs)<br />

o jasper_report_sosftp_repeat_for_mandator.job.xml<br />

� [install_path]/jasperreports/ (JasperReports files)<br />

� [install_path]/jasperreports/config (Configuration for JasperReports)<br />

Software- und Organisations-Service GmbH<br />

o sos_settings_sosftp.ini (Database connection settings)<br />

o sosftp_mandator_monthly.jasper (Compilation of the jrxml file)<br />

o sosftp_mandator_monthly.jrxml (JasperReports definition)<br />

o sosftp_monthly.jasper (Compilation of the jrxml file)<br />

o sosftp_monthly.jrxml (JasperReports definition)<br />

o sosftp_oracle_mandator_monthly.sql (SQL-script for the mandator reports)<br />

o sosftp_oracle_mandator_monthly_names.sql (SQL-script for mandator names)<br />

o sosftp_oracle_monthly.sql (SQL-script for the complete report)<br />

� [install_path]/jasperreports/reports (Empty directory for the reports)<br />

� [install_path]/jobs/ (Directory for Job documentations)<br />

o JobSchedulerJasperReportJob.xml (Application Manager Job doc.)<br />

o JobSchedulerJasperReportJobRepeat.xml (Mandator Job documentation)<br />

� [install_path]/lib/ (Directory for the libraries)<br />

o bcmail-jdk13-115.jar<br />

o commons-collections-2.1.jar<br />

o commons-digester-1.7.jar<br />

o commons-javaflow-20060411.jar<br />

o itext-1.3.1.jar<br />

o jasperreports-1.2.5.jar<br />

o poi-2.0-final-20040126.jar<br />

o sos.documentfactory.jar<br />

o sos.stacks.jar


<strong>SOS</strong>FTP <strong>Documentation</strong> 10<br />

3 Architecture<br />

3.1 <strong>SOS</strong>FTP Client<br />

3.1.1 Simple Transfer<br />

Figure 1: Simple file transfer<br />

A simple transfer is a direct data transfer within one TCP/IP network. The <strong>SOS</strong>FTP Client is configured and executed<br />

on one host while an FTP or SFTP server in the same network is required.<br />

The <strong>SOS</strong>FTP Client supports the following operations:<br />

� The functionality of the operations send and receive is given in Figure 1.<br />

� The operation send allows the upload of files from one host to the FTP/SFTP server.<br />

� The operation receive is used for the download of files from the server to the host.<br />

� The operation remove allows the removal of files on the server.<br />

� The operation execute is available when using a SSH server. It allows the execution of a command by<br />

SSH on the remote host.<br />

� The operation install installs a copy of the <strong>SOS</strong>FTP Client on a remote host.<br />

The prerequisite for the Jump Transfer is an installation of the <strong>SOS</strong>FTP Client on a remote host in the DMZ.<br />

Such a remote host is called a Jump Host.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 11<br />

3.1.2 Jump Transfer<br />

The following schema illustrates the use of jump transfers:<br />

Figure 2: Sending files by Jump Transfer<br />

Compared to the Simple Transfer the Jump Transfer is a more advanced mechanism that allows files to be<br />

transferred between two different TCP/IP networks, i.e. intranet and internet which are connected by a Demilitarized<br />

Zone (DMZ). The DMZ contains one ore more servers which are protected by package filters to the connected<br />

networks.<br />

Due to the level of protection usually there is no direct file transfer enabled by default between the intranet and<br />

the internet through the DMZ. With the <strong>SOS</strong>FTP Client this is easy to achieve without creating security holes.<br />

The <strong>SOS</strong>FTP Client can act as a bridge. For file transfers through the DMZ the only requirement is to install a<br />

copy of the <strong>SOS</strong>FTP Client on a host in the DMZ. Furthermore such a host is called a Jump Host. An installation<br />

on a Jump Host is effected by using the install operation of <strong>SOS</strong>FTP.<br />

� For sending files by Jump Transfer the <strong>SOS</strong>FTP Client on the local host sends the files to the Jump Host<br />

and configures the Jump Host to send the files to the FTP/SFTP server on the remote host in the internet.<br />

� For receiving files by Jump Transfer the <strong>SOS</strong>FTP Client on the local host configures the Jump Host to<br />

receive files from the FTP/SFTP server on the remote host in the internet and to send the files back to<br />

the local host in the intranet.<br />

The Jump Host is exclusively configured by the <strong>SOS</strong>FTP client at the local host. No sensitive data like passwords<br />

are stored on the Jump Host except for private key files that are possibly used to access the remote host.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 12<br />

Figure 3: Receiving files by Jump Transfer<br />

3.1.3 Log Output<br />

By default the <strong>SOS</strong>FTP Client logs any output to stdout. This output can be redirected into a log file. Additionally<br />

a transfer history file in csv format can be created. The transfer of each individual file results in a new entry to the<br />

transfer history file.<br />

The <strong>SOS</strong>FTP Server can be configured to pull the transfer history file and to import the history into a database<br />

(Transfer History Database). In addition, the information on individual file transfers is sent by UDP to the<br />

<strong>SOS</strong>FTP Server.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 13<br />

3.2 <strong>SOS</strong>FTP Server and Web GUI<br />

Figure 4: Interaction between <strong>SOS</strong>FTP Server, <strong>SOS</strong>FTP Client and Web GUI<br />

What is the <strong>SOS</strong>FTP Server?<br />

The <strong>SOS</strong>FTP Server is a specific configuration of a Job Scheduler instance.<br />

This Job Scheduler installation offers multiple automated functions for managing the transfer history of multiple<br />

<strong>SOS</strong>FTP Clients. This functionality includes:<br />

� Import the file transfer history information of the <strong>SOS</strong>FTP Clients into a central database<br />

� Analyse the collected transfer information<br />

� Create reports on the transfer history by using an open source stack with JasperReports<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 14<br />

Figure 5: Importing the Transfer History Data by two alternative ways<br />

3.2.1 Importing the Transfer History<br />

The primary task of the <strong>SOS</strong>FTP Server is to collect the transfer history created by the <strong>SOS</strong>FTP Clients and to<br />

store this information into the Transfer History Database. This step is required for subsequent data analysis.<br />

There are two ways how to import the file transfer history into the database:<br />

Figure 6: Jobs and Job Chains for importing the File Transfer History<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 15<br />

Import by Receiving Remote Files:<br />

Periodically the Job Scheduler creates an order for each defined <strong>SOS</strong>FTP Client to start the Job Chain 1<br />

(scheduler_sosftp_history_receive) which contains the Collect Job<br />

(scheduler_sosftp_history_receive). For each order the Collect Job receives by FTP/SFTP the transfer<br />

history files from the respective <strong>SOS</strong>FTP Client. The transfer history files are then stored in a local directory<br />

which is monitored by Job Chain 2 (scheduler_sosftp_history_file_order). Job Chain 2 implements<br />

the Import Job (scheduler_sosftp_import). For each transfer history file in the monitored directory a file<br />

order is automatically created by the Job Scheduler and the Import Job imports the information given in the respective<br />

transfer history files into the database. With the import being completed the local file copies are removed<br />

from the monitored directory.<br />

Import by Receiving UDP Messages:<br />

A <strong>SOS</strong>FTP Client is configured to actively send an UDP message which contains the information for each file<br />

that is being transferred. If one file transfer is executed for multiple files, then for each file a separate UDP message<br />

is being sent The UDP message is an order for Job Chain 3 (scheduler_sosftp_history) which contains<br />

the Import Job (scheduler_sosftp_import).<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 16<br />

3.2.2 Quick View with the Web GUI<br />

The Web GUI is an user interface that allows you to monitor the file transfer information that is stored in the database.<br />

To the Application Manager it offers the possibility to monitor the transfer information for each mandator<br />

separately. In detail the transfer information can be filtered by mandator, file name, error state (success/error),<br />

transfer operation (send, receive), transfer protocol, source and target host and by time interval.<br />

Figure 7: A browser window showing the Web GUI<br />

� If the checkbox “only last state” is checked then the listing is constrained to show only the last transaction<br />

of a file. A file is defined as the combination of source path and file name, i.e. the sources “sample1/a.xml”<br />

and “sample2/a.xml” are two different files.<br />

� If the checkbox “only last state” is not checked for a file then all transfers in the given time interval are<br />

listed.<br />

� If the checkbox “Refresh interval (all 60 s)“ is checked then the view is refreshed automatically every<br />

minute. You can refresh the view manually by hitting the “search” button.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 17<br />

3.3 <strong>SOS</strong>FTP Reporting<br />

Figure 8: Pipeline for Automatic Reporting<br />

Once the file transfer informations has been collected in a database one way for monitoring is by using the Web<br />

GUI as described above. Another way for monitoring are automatically generated reports. Such a report can be<br />

stored as one or more files. The supported file formats are <strong>PDF</strong>, HTML, RTF, XML and XLS. Additionally either<br />

the complete Report or just a simple notification can automatically be sent by email to the application manager.<br />

The Report is created by using JasperReports jobs that are executed by the Job Scheduler of the <strong>SOS</strong>FTP<br />

Server. There are two jobs supporting the generation of reports:<br />

1. JobSchedulerJasperReportJob<br />

This job receives the information for all file transfers from the database and generates a report. This report can<br />

be stored in multiple file formats simultaneously. Optional the application manager is informed by email.<br />

2. JobSchedulerJasperReportJobRepeat<br />

This job receives the names of all different mandators from the database. For each mandator name the job Job-<br />

SchedulerJasperReportJob is parameterized individually to generate an individual report. For each mandator<br />

separate report files are stored with the name of the mandator as its prefix. Again an individual report can be<br />

stored in multiple file formats simultaneously. Optional the application manager is informed by email.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 18<br />

4 Use Cases Client<br />

The <strong>SOS</strong>FTP Client is executed by calling the <strong>SOS</strong>FTP command line script. For UNIX this is sosftp.sh and<br />

for Windows this is sosftp.cmd. The script is configured by command line arguments. No specific order is required<br />

for the arguments.<br />

Example 1<br />

sosftp.cmd -protocol=ftp -operation=send -host=8of9 -user=sos -password=sos<br />

-local_dir=samples\outbound\ a1.xml b1.xml c1.xml<br />

-remote_dir=\remote\sosftp\inbound\<br />

Sends the three files a1.xml, b1.xml and c1.xml from the current local subdirectory samples\outbound\<br />

to the remote directory \remote\inbound\ on the FTP-Server by using the FTP protocol.<br />

Example 2<br />

sosftp.cmd -protocol=ftp -operation=send -host=8of9 -user=sos -password=sos<br />

-local_dir=samples\outbound\ -file_spec=.*<br />

-remote_dir=\remote\sosftp\inbound\<br />

Sends all files matching the regular expression .* from the current local subdirectory samples\outbound\ to<br />

the remote directory \remote\inbound\ on the FTP-Server by using the FTP protocol.<br />

4.1 Configuration with Profiles<br />

For better handling of the configuration all parts of the parameterization except for the parameter –operation<br />

can by outsourced in a configuration file. This is a text only file which has the following structure:<br />

;comment<br />

[profile name]<br />

;comment<br />

key=value<br />

A profile section can contain any valid arguments of the command line script. The respective profile section is<br />

specified with the argument –profile. The configuration file that contains the profile is specified with the command<br />

line argument –settings.<br />

See the following samples for profile sections that correspond to the above configuration.<br />

The configuration file is called ftp_settings.ini and it contains the profile ftp_8of9:<br />

…<br />

[ftp_8of9]<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 19<br />

password = sos<br />

remote_dir = \remote\sosftp\inbound\<br />

…<br />

Example 1<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_8of9 -operation=send<br />

-local_dir=samples\outbound\ a1.xml b1.xml c1.xml<br />

Example 2<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_8of9 -operation=send<br />

-local_dir=samples\outbound\ -file_spec=.*<br />

4.2 Simple Transfer<br />

Here are some example script calls of the <strong>SOS</strong>FTP client with the Windows <strong>SOS</strong>FTP start script.<br />

A complete description of the available parameters can be found in the next chapter.<br />

Sending Files by FTP<br />

The used profile of the configuration file ftp_settings.ini:<br />

…<br />

[ftp_send]<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

password = sos<br />

file_spec = .*<br />

local_dir = outbound/<br />

remote_dir = /inbound/<br />

…<br />

Command 1:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_send -operation=send<br />

All files of the local directory outbound/ are sent to the remote directory /inbound/.<br />

The next three commands have the same result. The files a2.xml, b2.xml and c2.xml of the local directory<br />

outbound/ are send to the remote directory /inbound/.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 20<br />

For Unix the files separated by a semicolon ‘;’ have to be quoted with quotation marks ‘”’. The directly listed<br />

files gets a higher priority than the file_spec parameter.<br />

Command 2:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_send -operation=send<br />

-local_dir=outbound\ a2.xml;b2.xml;c2.xml<br />

Command 3:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_send -operation=send<br />

-local_dir=outbound\ a2.xml b2.xml c2.xml<br />

Command 4:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_send -operation=send<br />

-local_dir= file_path=outbound\a2.xml;outbound\b2.xml;outbound\c2.xml<br />

Receiving Files by FTP<br />

The used profile of the configuration file ftp_settings.ini:<br />

…<br />

[ftp_receive]<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

password = sos<br />

file_spec = .*<br />

local_dir = inbound/<br />

remote_dir = /outbound/<br />

…<br />

Command 5:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_receive -operation=receive<br />

All files from the remote directory /outbound/ are downloaded to the local directory inbound/.<br />

The next three Commands have the same result. The files a2.xml, b2.xml and c2.xml of the remote directory<br />

/outbound/ are downloaded to the local directory inbound/.<br />

At Unix the files separated by a semicolon ‘;’ have to be quoted with quotation marks ‘”’. The directly listed files<br />

gets a higher priority than the file_spec parameter.<br />

Command 6:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_receive -operation=receive -<br />

remote_dir=/outbound/ a2.xml;b2.xml;c2.xml<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 21<br />

Command 7:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_receive -operation=receive<br />

/outbound/a2.xml /outbound/b2.xml /outbound/c2.xml<br />

Command 8:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_receive -operation=receive -<br />

remote_dir= outbound/a2.xml;/outbound/b2.xml;/outbound/c2.xml<br />

Sending Files by SFTP with Password Authentication<br />

The used profile of the configuration file ftp_settings.ini:<br />

…<br />

[sftp_send]<br />

protocol = sftp<br />

host = kyrill<br />

user = sos<br />

password = sos<br />

ssh_auth_method = password<br />

file_spec = .*<br />

local_dir = outbound/<br />

remote_dir = /home/sos/inbound/<br />

…<br />

Command 9:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=sftp_send -operation=send<br />

All files of the local directory outbound/ are send to the remote directory /home/sos/inbound/.<br />

Receiving Files by SFTP with Password Authentication<br />

The used profile of the configuration file ftp_settings.ini:<br />

…<br />

[sftp_kyrill_receive]<br />

protocol = sftp<br />

host = kyrill<br />

user = sos<br />

password = sos<br />

ssh_auth_method = password<br />

file_spec = .*<br />

local_dir = inbound/<br />

remote_dir = /home/sos/outbound/<br />

…<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 22<br />

Command 10:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=sftp_receive -operation=receive<br />

All files of the remote directory /home/sos/outbound/ are downloaded to the local directory inbound/.<br />

Sending Files by SFTP with Public Key Authentication<br />

The profile used in the configuration file ftp_settings.ini is:<br />

…<br />

[sftp_pki_send]<br />

protocol = sftp<br />

host = kyrill<br />

user = sos<br />

ssh_auth_method = publickey<br />

ssh_auth_file = ssh/mykey_rsa<br />

file_spec = .*<br />

local_dir = outbound/<br />

remote_dir = /home/sos/inbound/<br />

…<br />

Command 11:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=sftp_pki_send -operation=send<br />

All files of the local directory outbound/ will be sent to the remote directory /home/sos/inbound/.<br />

Instead of password authentication the private key contained in the file mykey_rsa in the subdirectory ssh/ is<br />

used for authentication. The corresponding public key has to be installed before on the host kyrill.<br />

Receiving Files by SFTP with Public-Key Authentication<br />

The profile in use is contained in the configuration file ftp_settings.ini:<br />

…<br />

[sftp_pki_receive]<br />

protocol = sftp<br />

host = kyrill<br />

user = sos<br />

ssh_auth_method = publickey<br />

ssh_auth_file = ssh/mykey_rsa<br />

file_spec = .*<br />

local_dir = inbound/<br />

remote_dir = /home/sos/outbound/<br />

…<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 23<br />

Command 12:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=sftp_pki_receive -operation=receive<br />

All files of the remote directory /home/sos/outbound/ are transferred to the local directory inbound/.<br />

Instead of password authentication the private key contained in the file mykey_rsa in the subdirectory ssh/ is<br />

used for authentication. The corresponding public key has to be installed on the host kyrill beforehand.<br />

4.3 Install Operation<br />

Before using the Jump Transfer the <strong>SOS</strong>FTP Client has to be installed for the designated Jump Host.<br />

Installation of <strong>SOS</strong>FTP for the Jump Host<br />

The profile of the configuration file ftp_settings.ini:<br />

…<br />

[install_kyrill]<br />

protocol = sftp<br />

host = kyrill<br />

user = sos<br />

password = sos<br />

ssh_auth_method = password<br />

make_dirs = yes<br />

classpath_base = /home/sos/sosftp_installation<br />

…<br />

Command:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=install_kyrill -operation=install<br />

Installs the <strong>SOS</strong>FTP Client in the directory /home/sos/sosftp_installation at the host kyrill. Should<br />

the directory /home/sos/sosftp_installation not exist then it will be created automatically. The host<br />

kyrill does serve as a Jump Host for Jump Transfer execution. Remote Execution does not require such an<br />

installation. The new installation will contain the files of the default package <strong>SOS</strong>FTP Client. Other files that has<br />

been added by the user are not included in the new installation.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 24<br />

4.4 Jump Transfer<br />

Remote Execution (execute jump-command)<br />

The profile of the configuration file ftp_settings.ini:<br />

…<br />

[remote_exe]<br />

;jump_protocol = sftp (default)<br />

jump_host = kyrill<br />

jump_user = sos<br />

jump_password = sos<br />

jump_ssh_auth_method = password<br />

jump_command = touch /home/sos/testfile<br />

[remote_exe_pki]<br />

;jump_protocol = sftp (default)<br />

jump_host = kyrill<br />

jump_user = sos<br />

jump_ssh_auth_method = publickey<br />

jump_ssh_auth_file = ssh/mykey_rsa<br />

jump_command = touch /home/sos/testfile<br />

…<br />

Command 1:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=remote_exe -operation=execute<br />

Command 2:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=remote_exe_pki -operation=execute<br />

Both commands configure the command “touch /home/sos/testfile” to be executed on the host kyrill.<br />

A file with the name testfile will be created in the directory /home/sos/.<br />

Remote Sending with FTP, Copy and Move<br />

The profile of the configuration file ftp_settings.ini:<br />

…<br />

[jump_kyrill_and_send_to_8of9]<br />

;jump_protocol = sftp (default)<br />

jump_host = kyrill<br />

jump_user = sos<br />

jump_password = sos<br />

jump_ssh_auth_method = password<br />

jump_command = /home/sos/sosftp_installation/sosftp.sh<br />

file_spec = .*<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 25<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

password = sos<br />

local_dir = outbound/<br />

remote_dir = /inbound/<br />

…<br />

Command 3: Copy Files<br />

sosftp.cmd -settings=ftp_settings.ini -profile=jump_kyrill_and_send_to_8of9<br />

-operation=send<br />

All files of the local directory outbound/ will be sent to the Jump Host kyrill and then will be forwarded by<br />

FTP to the remote directory /inbound/ at the host 8of9. For the jump_command the <strong>SOS</strong>FTP Client script of<br />

the installation is assigned. Due to the fact that the host kyrill is running a Unix operating system the shell<br />

version of the client script is used.<br />

Command 4: Move Files<br />

sosftp.cmd -settings=ftp_settings.ini -profile=jump_kyrill_and_send_to_8of9<br />

-operation=send -remove_files=yes<br />

All files of the local directory outbound/ will be sent to the Jump Host kyrill and then will be forwarded by<br />

FTP to the remote directory /inbound/ at the host 8of9. After successful transfer the files that have been<br />

transferred will be removed from the directory of the local host.<br />

Remote Receiving with FTP, Copy and Move<br />

The profile of the configuration file ftp_settings.ini:<br />

…<br />

[jump_kyrill_and_receive_from_8of9]<br />

;jump_protocol = sftp (default)<br />

jump_host = kyrill<br />

jump_user = sos<br />

jump_password = sos<br />

jump_ssh_auth_method = password<br />

jump_command = /home/sos/sosftp_installation/sosftp.sh<br />

file_spec = .*<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

password = sos<br />

local_dir = inbound/<br />

remote_dir = /outbound/<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 26<br />

…<br />

Command 5: Copy Files<br />

sosftp.cmd -settings=ftp_settings.ini -profile=jump_kyrill_and_receive_from_8of9<br />

-operation=receive<br />

All files of the remote directory /outbound/ of the host 8of9 are downloaded by FTP to the Jump Host<br />

kyrill and from there are forwarded to the local directory inbound/ at the localhost. For the jump_command<br />

the <strong>SOS</strong>FTP client script of the installation is declared. Due to the fact that the host kyrill is running Unix the<br />

shell version of the client script is used.<br />

Command 6: Move Files<br />

sosftp.cmd -settings=ftp_settings.ini -profile=jump_kyrill_and_receive_from_8of9<br />

-operation=receive -remove_files=yes<br />

All files of the remote directory /outbound/ of the host 8of9 are downloaded by FTP to the Jump Host<br />

kyrill and from there are forwarded to the local directory inbound/ at the localhost. After successfully copying<br />

the previously downloaded files in the remote directory of the remote host 8of9 are deleted.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 27<br />

4.5 Polling for files<br />

(receive only)<br />

The previous use cases for file transfer require that the files that should be transferred do exist in the source<br />

directory before the <strong>SOS</strong>FTP Client starts. The polling-feature allows that the files appear in the source directory<br />

after the <strong>SOS</strong>FTP client is started. Configured with the parameter ”poll_timeout“ the client will not terminate<br />

until the specified timeout is reached or a file is found in the source directory during a file check which is performed<br />

in the interval specified by the parameter “poll_interval”.<br />

Example Command:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=polling_receive -operation=receive<br />

The profile of the configuration file ftp_settings.ini:<br />

…<br />

[polling_receive]<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

password = sos<br />

file_spec = .*<br />

remote_dir = /outbound/<br />

local_dir = inbound/<br />

poll_timeout = 30<br />

poll_interval = 60<br />

…<br />

For 30 minutes every 60 seconds the <strong>SOS</strong>FTP Client will check if there are any files (.*) in the remote directory.<br />

As soon as at least one file is found during this check all files in the remote directory are downloaded into the<br />

local directory and the client terminates with a success message.<br />

After 30 minutes if no files are found in the remote directory the client terminates with the error “no matching<br />

files”.<br />

The additional parameter “poll_minfiles” allows a regulation of the file transfer by a threshold N in respect to<br />

the number of files in the remote directory. The file transfer starts only if at least N files are found in the remote<br />

directory.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 28<br />

4.6 Logging<br />

There are two options for logging, the transfer log and the transfer history. Both can be used independently from<br />

each other:<br />

4.6.1 Transfer Log<br />

The transfer log contains all relevant transfer information. By default this is logged to stdout. Instead of logging to<br />

stdout you can redirect the log output into a file by using the parameter “log_filename”. Should this file not yet<br />

exist then it will be created otherwise the log output is appended to the existing file.<br />

4.6.2 Transfer History<br />

(send and receive only, not for jump)<br />

The transfer history is created in order to store the file transfer information of the <strong>SOS</strong>FTP Client into a CSV file<br />

and subsequently into a database. The information about file transfers is required for further processing steps<br />

like automated alerting. By default this log type is not active as it requires the <strong>SOS</strong>FTP server to be in place.<br />

Example Command 1:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_send -operation=send<br />

The profile of the configuration file ftp_settings.ini:<br />

…<br />

[ftp_send]<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

password = sos<br />

file_spec = .*<br />

local_dir = outbound/<br />

remote_dir = /inbound/<br />

history = history.csv<br />

…<br />

By setting a filename for the parameter “history” this log output is written to that file in CSV format. Should the<br />

file not yet exist then it will be created otherwise the log output will be appended to the existing file. The transfer<br />

history is one text line per transferred file. If one call of the <strong>SOS</strong>FTP Client causes the transfer of N files then N<br />

records are created. The transfer history is only created for the operations send and receive. Each record contains<br />

the following values:<br />

guid;mandator;transfer_timestamp;pid;ppid;operation;<br />

localhost;localhost_ip;local_user;remote_host;remote_host_ip;remote_user;<br />

protocol;port;local_dir;remote_dir;local_filename;remote_filename;file_size;<br />

md5;status;last_error_message;log_filename<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 29<br />

Example record of one transferred file:<br />

1235129738140;<strong>SOS</strong>;2009-02-19 12:35:38;0;0;send;<br />

beh;192.11.0.33;sos;wilma;192.11.0.61;test;<br />

ftp;21;C:\sosftp\out;/tmp/inbound/;1.txt;1.txt;1509;<br />

939af88ca294a5a74d04036bd5955599;success;;<br />

The file can be parsed by a <strong>SOS</strong>FTP Server for importing the new record sets into the Transfer History Database.<br />

To avoid duplicate entries in the database identical record sets will be detected and only new record sets<br />

will be imported.<br />

Example Command 2:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_send -operation=send<br />

The profile of the configuration file ftp_settings.ini:<br />

…<br />

[ftp_send]<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

password = sos<br />

file_spec = .*<br />

local_dir = outbound/<br />

remote_dir = /inbound/<br />

scheduler_host = 8of9<br />

scheduler_port = 4994<br />

…<br />

By setting the parameters “scheduler_host” and “scheduler_port” the <strong>SOS</strong>FTP Client sends each history<br />

record set to a Job Scheduler as an UDP message. Such an UDP message can be accepted as an order if the<br />

Job Scheduler is configured as <strong>SOS</strong>FTP Server. In this case, the message data will be instantly imported into<br />

the Transfer History Database.<br />

For further details see the parameter reference for history processing.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 30<br />

4.7 Dynamic Password Retrieval<br />

Instead of a hard-wired password in your configuration you can define a script. This script has to return the<br />

password by printing it to stdout. The password script should not write any output to stdout except for the password.<br />

Sample Dynamic Password Script getpassword.cmd:<br />

@echo sos<br />

You include this script by just setting it as password. Embedded into backticks “`” the password is interpreted as<br />

a script which is evaluated:<br />

password = `getpassword.cmd`<br />

If the exit code of that script is 0 then its output to stdout is interpreted as a password. If the exit code of that<br />

script is not 0 then the original parameter value is used as a password. For security concerns the script output<br />

will not get logged - neither for stdout nor for stderr. Should you run into trouble then you could increase the log<br />

level to level 3 in order to see what script is executed and to level 8 in order to check if the exit code is 0.<br />

Sending Files by FTP authenticated with a Dynamic Password<br />

The profile of the configuration file ftp_settings.ini:<br />

…<br />

[ftp_send_dyn]<br />

protocol = ftp<br />

host = 8of9<br />

user = sos<br />

; password = sos ; hard wired password<br />

password = `.\getpassword.cmd` ; dynamic password<br />

file_spec = .*<br />

local_dir = outbound/<br />

remote_dir = /inbound/<br />

…<br />

Example Command:<br />

sosftp.cmd -settings=ftp_settings.ini -profile=ftp_send_dyn -operation=send<br />

Dynamic Password Scripts can be used alternatively to the parameter “password” for the protocols FTP, SFTP<br />

and FTPS. The parameter “jump_password” for the Jump Host does NOT support Dynamic Password Scripts.<br />

The path of the Dynamic Password Script is always relative to your local host.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 31<br />

5 Use Cases Server<br />

The configuration of the <strong>SOS</strong>FTP Server can be found in the scheduler_sosftp_history.xml and<br />

scheduler_sosftp_history_params.xml files. Once you have followed the above installation instructions<br />

you will find these files in the Job Scheduler configuration directory [install_path]/config/<br />

where [install_path] is the installation path of the Job Scheduler.<br />

5.1 History Import<br />

Figure 9: Jobs and Job Chains for importing the File Transfer History<br />

scheduler_sosftp_history.xml<br />

This file contains the following job chains and jobs which support the history import:<br />

For Import by Receiving Remote Files:<br />

Job chain scheduler_sosftp_history_receive (Job Chain 1)<br />

Job chain scheduler_sosftp_history_file_order (Job Chain 2)<br />

Job scheduler_sosftp_history_receive (Collect Job)<br />

Job scheduler_sosftp_import (Import Job)<br />

For Import by Receiving UDP Messages:<br />

Job chain scheduler_sosftp_history (Job Chain 3)<br />

Job scheduler_sosftp_import (Import Job)<br />

For both variants the same Import Job is used.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 32<br />

scheduler_sosftp_history_params.xml<br />

This file contains the parameters for the JDBC database connection used for import of the transfer history file:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

This is a sample configuration for an Oracle Database.<br />

For further information about the configuration of database connections see the Job Scheduler Reference<br />

<strong>Documentation</strong>:<br />

http://www.sos-berlin.com/doc/en/scheduler.pdf<br />

5.1.1 Job Configuration<br />

Here you will find sample configurations for collecting and importing transfer history files:<br />

scheduler_sosftp_history_receive (Job Chain 1):<br />

<br />

<br />

<br />

<br />

<br />

scheduler_sosftp_history_receive (Collect Job):<br />

This job copies the history file (csv) of one client host to a directory monitored by the <strong>SOS</strong>FTP Server.<br />


<strong>SOS</strong>FTP <strong>Documentation</strong> 33<br />

order = "yes"<br />

process_class = "multi"><br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

scheduler_sosftp_history_file_order (Job Chain 2):<br />

<br />

<br />

<br />

<br />

<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 34<br />

scheduler_sosftp_import (Import Job):<br />

Import the history record sets into the database.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

scheduler_sosftp_history (Job Chain 3):<br />

<br />

<br />

<br />

<br />

<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 35<br />

5.1.2 Setting up orders for receiving history files<br />

For each <strong>SOS</strong>FTP Client you need an individual order to receive its history file(s). This order is sent by a Job<br />

Scheduler command. The order contains the parameters for the job scheduler_sosftp_history_receive.<br />

For parameter reference see the job documentation of the job JobSchedulerFTPReceive at http://www.sosberlin.com/download/scheduler/sources/sos/scheduler/jobdoc/JobSchedulerFTPReceive.xml.<br />

Sample order:<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

The <strong>SOS</strong>FTP Server executes this command at the last day of each month at 10 o’clock. If you wish to receive<br />

the history files from another <strong>SOS</strong>FTP Client then just add another element to and<br />

adjust the values accordingly.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 36<br />

5.2 Custom Fields<br />

The Custom Fields provide an additional feature for the transfer history. You can define your own parameters.<br />

These parameters have to be set at your <strong>SOS</strong>FTP Client call. They are written into the transfer history file, imported<br />

into your database and can be checked in the Web GUI and/or processed by the Reporting Jobs.<br />

5.2.1 <strong>SOS</strong>FTP Client<br />

The <strong>SOS</strong>FTP Client can process your own parameters if you write them at the command line in the form<br />

-history_entry_fieldname=fieldvalue<br />

The transfer history will contain a new field fieldname and the corresponding data sets will additionally contain<br />

the value fieldvalue. The Import Job of the <strong>SOS</strong>FTP Server will automatically import the custom fields into<br />

your database.<br />

Example Command:<br />

sosftp.cmd … -history_entry_myfield1=value1 –history_entry_myfield2=value2 …<br />

After executing this command the transfer history file will contain two new column names myfield1 and<br />

myfield2:<br />

…;md5;status;last_error_message;log_filename;myfield1;myfield2<br />

The additional values are appended to the corresponding data sets:<br />

…;939af88ca294a5a74d04036bd5955599;success;;;value1;value2<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 37<br />

5.2.2 Web GUI<br />

If your database contains your own parameters then you are able to watch them in the Web GUI.<br />

Figure 10: The Custom Fields “custom_field_1” and “custom_field_2” in the Web GUI<br />

To activate the view for the new parameters you have to adapt the PHP-Array $sosftp_custom_fields in<br />

your Web GUI configuration file sosftp_web/custom/custom.inc.php.<br />

Sample Configuration for Figure 9:<br />

/*<br />

-- array key : database field name<br />

*/<br />

$sosftp_custom_fields = array(<br />

'CUSTOM_FIELD_1' => '',<br />

'CUSTOM_FIELD_2' => '',<br />

);<br />

This sample configuration expands the view of the Web GUI by the Custom Fields columns CUSTOM_FIELD_1<br />

and CUSTOM_FIELD_2 of the database table <strong>SOS</strong>FTP_FILES_HISTORY.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 38<br />

Figure 11: The Custom Fields “custom_field_1” and “custom_field_2” are titled “Title_1” and “Title_2”. The value<br />

of “custom_field_2” is also displayed in the fields of column “Title_1”.<br />

Sample Configuration for Figure 10:<br />

/*<br />

-- array key : database field name<br />

-- optional<br />

-- title : field title as th (default - field name)<br />

-- width : td width (default 50)<br />

-- type : type for sorting (string, numeric: default - string)<br />

-- fields: field values will be displayed in the same column (separated by )<br />

*/<br />

$sosftp_custom_fields = array(<br />

'CUSTOM_FIELD_1' => array('title'=>'CUSTOM_FIELD_1 Title', 'width'=>'100',<br />

'type'=>'string', 'fields'=>'CUSTOM_FIELD_2'),<br />

);<br />

'CUSTOM_FIELD_2'=>array('title'=>'CUSTOM_FIELD_2 Title', 'width'=>'100',<br />

'type'=>'string'),<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 39<br />

This sample configuration sets individual titles for the two Custom Fields in the table header. Additionally the<br />

values of CUSTOM_FIELD_2 are embedded in the column of CUSTOM_FIELD_1.<br />

5.3 <strong>SOS</strong>FTP Reporting<br />

This is a step by step guide to get your first <strong>SOS</strong>FTP Report.<br />

5.3.1 Configuration<br />

Here are examples for two job configurations of the two JasperReports jobs defined in the file<br />

[install_path]/config/scheduler_jasperreports_sosftp.xml.<br />

This is the default configuration.<br />

Example 1)<br />

The following job generates a report with information targeted at Application Managers on the first day on every<br />

month.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />


<strong>SOS</strong>FTP <strong>Documentation</strong> 40<br />

language="java"/><br />

<br />

<br />

<br />

<br />

<br />

<br />

Example 2)<br />

The following job generates a report with customer information on the first day of every month for each mandator.<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 41<br />

<br />

<br />

<br />

<br />

<br />

The job parameter repeat_sql_statement accepts a SQL string as well as a path to a SQL script.<br />

In Example 2 the path to a SQL script is given. Short SQL statements can also be declared directly:<br />

<br />

Database Connection<br />

Customize the file [scheduler install_path]/jasperreports/config/sos_settings_sosftp.ini<br />

Example settings for an Oracle database:<br />

[configuration]<br />

class = <strong>SOS</strong>OracleConnection<br />

driver = oracle.jdbc.driver.OracleDriver<br />

url = jdbc:oracle:thin:@8of9:1521:test<br />

user = test<br />

password = test<br />

compatibility = normal<br />

5.3.2 Generating a Report<br />

Start the <strong>SOS</strong>FTP Server and run the job jasper_report_sosftp. The job creates in the directory<br />

[scheduler install_path]/jasperreports/reports/ the files sosftp.pdf and sosftp.xls.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 42<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 43<br />

Figure 12: Sample sosftp.pdf. A <strong>SOS</strong>FTP Report in <strong>PDF</strong> format for the Application Manager containing<br />

the transfer information of three mandators.<br />

Software- und Organisations-Service GmbH


<strong>SOS</strong>FTP <strong>Documentation</strong> 44<br />

6 Complete Client Parameter Reference<br />

operation Default: ---<br />

settings Default: ---<br />

Software- und Organisations-Service GmbH<br />

send, receive, remove, execute or install.<br />

send - transfer files by FTP/SFTP to a remote server<br />

receive - transfer files by FTP/SFTP from a remote server<br />

remove - remove files by FTP/SFTP on a remote server<br />

execute - execute a command by SSH on a remote server<br />

install - install <strong>SOS</strong>FTP on a remote server<br />

[optional] A configuration file can be specified that contains profiles, i.e. sections,<br />

with parameters specified as pairs of names and values in a plain text<br />

format like this:<br />

[sample_transfer]<br />

protocol = ftp<br />

host = localhost<br />

port = 21<br />

local_dir = /tmp<br />

...<br />

profile Default: ---<br />

At the command line the name of the configuration file and the profile<br />

are specified like this:<br />

sosftp.sh -operation=send -settings=settings.ini -<br />

profile=sample_transfer ...<br />

A profile can reference the contents of other profiles like this:<br />

[default]<br />

history = /sosftp/transfer_history.csv<br />

mandator = <strong>SOS</strong><br />

scheduler_host = localhost<br />

scheduler_port = 4444<br />

[sample_transfer]<br />

include = default<br />

protocol = ftp<br />

host = www.sos-berlin.com<br />

port = 21<br />

local_dir = /tmp<br />

...<br />

With this sample the profile sample_transfer includes the default profile<br />

via the include directive and thus applies the file transfer history settings.<br />

[optional] If a configuration file is being used (see parameter settings), then this


<strong>SOS</strong>FTP <strong>Documentation</strong> 45<br />

verbose Default: ---<br />

Software- und Organisations-Service GmbH<br />

parameter specifies a section within the configuration file. Such sections,<br />

i.e. profiles, specify parameters as pairs of names and values that<br />

otherwise would be specified by command line parameters.<br />

At the command line the name of the configuration file and the profile<br />

are specified like this:<br />

sosftp.sh -operation=send -settings=settings.ini -<br />

profile=sample_transfer ...<br />

Parameters for logging<br />

[optional] The verbosity level specifies the intensity of log entries. A value between<br />

1 and 9 can be specified. Higher values cause more detailed information<br />

to be logged.<br />

log_filename Default: ---<br />

Log output is written to stdout or to a file that has been specified with<br />

the parameter log_filename.<br />

[optional] This parameter specifies the location of a file to which the log output<br />

will be written.<br />

banner_header Default: ---<br />

Should the file not exist then it will be created. If the already exists<br />

then all log output will be appended.<br />

Without specifying this parameter all log output will be written to<br />

stdout.<br />

[optional] This program logs output to stdout or to a file that has been specified<br />

by the parameter log_filename. A template can be used in order to<br />

organize the output that is created. The output is grouped into header,<br />

file list and footer.<br />

This parameter specifies a template file for header output.<br />

Templates can use internal variables and parameters as placeholders in<br />

the form %{placeholder}. The standard header template looks like this:<br />

************************************************************<br />

*************<br />

*<br />

*<br />

* <strong>SOS</strong>FTP - Managed File Transfer Utility<br />

*<br />

* --------------------------------------<br />

*<br />

*<br />

*<br />

************************************************************<br />

*************<br />

version = %{version}


<strong>SOS</strong>FTP <strong>Documentation</strong> 46<br />

banner_footer Default: ---<br />

Software- und Organisations-Service GmbH<br />

date = %{date} %{time}<br />

operation = %{operation}<br />

protocol = %{protocol}<br />

file specification = %{file_spec}<br />

file path = %{file_path}<br />

source host = %{localhost} (%{local_host_ip})<br />

local directory = %{local_dir}<br />

jump host = %{jump_host}<br />

target host = %{host} (%{host_ip})<br />

target directory = %{remote_dir}<br />

pid = %{current_pid}<br />

ppid = %{ppid}<br />

************************************************************<br />

*************<br />

[optional] This program logs output to stdout or to a file that has been specified<br />

by the parameter log_filename. A template can be used in order to<br />

organize the output that is created. The output is grouped into header,<br />

file list and footer.<br />

protocol Default: ftp<br />

host Default: ---<br />

port Default: 21<br />

This parameter specifies a template file for footer output.<br />

Templates can use internal variables and parameters as placeholders in<br />

the form %{placeholder}. The standard footer template looks like this:<br />

************************************************************<br />

*************<br />

execution status = %{status}<br />

successful transfers = %{successful_transfers}<br />

failed transfers = %{failed_transfers}<br />

last error = %{last_error}<br />

************************************************************<br />

*************<br />

Parameters for server connections<br />

user Default: anonymous<br />

password Default: ---<br />

The values ftp, sftp or ftps are valid for this parameter.<br />

If sftp is used, then the ssh_* parameters will be applied.<br />

Host or IP address from which or to which files should be transferred.<br />

Port by which files should be transferred. For FTP this is usually port 21,<br />

for SFTP this is usually port 22.<br />

User name for authentication at the FTP/SFTP server.


<strong>SOS</strong>FTP <strong>Documentation</strong> 47<br />

[optional] Password for authentication at the FTP/SFTP server.<br />

account Default: ---<br />

Software- und Organisations-Service GmbH<br />

For SSH/SFTP connections that make use of public/private key authentication<br />

the password parameter is specified for the passphrase that<br />

optionally secures a private key.<br />

[optional] Optional account info for authentication with an FTP server.<br />

transfer_mode Default: binary<br />

[optional] Transfer mode is used for FTP exclusively and can be either ascii or<br />

binary.<br />

passive_mode Default: 0<br />

[optional] Passive mode for FTP is often used with firewalls. Valid values are 0 or<br />

1.<br />

remote_dir Default: .<br />

local_dir Default: .<br />

file_spec Default: .*<br />

Directory at the FTP/SFTP server from which or to which files should be<br />

transferred.<br />

By default the home directory of the user at the FTP/SFTP server is<br />

used.<br />

Local directory into which or from which files should be transferred. By<br />

default the current working directory is used.<br />

Besides paths in the local file system UNC path names are supported<br />

that could be used to address remote server systems:<br />

\\somehost\somedirectory can be used in the same way as<br />

//somehost/somedirectory to transfer files from an FTP/SFTP server<br />

to a different remote server system.<br />

Moreover, you could specify URIs for a file schema as in<br />

file:////somehost/somedirectory. Please, consider the required<br />

number of slashes. file URIs are subject to the following limitations<br />

due to constraints of the underlying Java JRE:<br />

File names and path names must not contain any spaces.<br />

Authentication by authority strings as in<br />

file:////user:password@somehost/somedirectory is not supported.<br />

[optional] This parameter expects a regular expression to select files from a local<br />

directory or from an FTP/SFTP server (depending on the operation parameter<br />

values send or receive) to be transferred.<br />

file_path Default: ---<br />

For the operations send and receive either this parameter has to be<br />

specified or the parameter file_path or a list of file names as additional<br />

parameters.


<strong>SOS</strong>FTP <strong>Documentation</strong> 48<br />

[optional] This parameter is used alternatively to the parameter file_spec to<br />

specify a single file for transfer.<br />

Software- und Organisations-Service GmbH<br />

When receiving files the following applies:<br />

This parameter accepts the absolute name and path of file at the<br />

FTP/SFTP server that should be transferred. The file name has to include<br />

both name and path of the file at the FTP/SFTP server.<br />

The file will be stored unter its name in the directory that is specified by<br />

the parameter local_dir.<br />

The following parameters are ignored should this parameter be used:<br />

file_spec and remote_dir.<br />

When sending files the following applies:<br />

This parameter accepts the absolute name and path of file that should<br />

be transferred. An absolute path has to be specified.<br />

The file will be stored under its name in the directory at the FTP/SFTP<br />

server that has been specified by the parameter remote_dir.<br />

The following parameters are ignored should this parameter be used:<br />

file_spec and local_dir.<br />

File set operations<br />

file_spec2 Default: ---<br />

[optional] In addition to what is stated for the parameter file_spec additional<br />

parameters can be specified for up to 9 file sets like this:<br />

-file_spec=.*\.gif$ -local_dir=/tmp/1 -remote_dir=/tmp/1<br />

-file_spec2=.*\.exe$::param_set_2 -<br />

param_set_2="transfer_mode=binary::remote_dir=/tmp/2::local_di<br />

r=/tmp/2"<br />

Within the file_spec2 parameter value the regular expression is separated<br />

by :: from the name of a file set. This name can freely be chosen,<br />

it consists of the characters 0-9, a-z and _.<br />

The name of the file set is used as a separate parameter in the command<br />

line. This parameter is assigend the list of parameters that should<br />

be valid for the specific file set. Therefore the names and values of individual<br />

parameters are specified in the form name=value::name2=value2<br />

.... Such parameters are exclusively valid for the specific file set.<br />

The above sample causes all files with the extension .gif to be transferred<br />

from the local directory /tmp/1 to a directory with the same


<strong>SOS</strong>FTP <strong>Documentation</strong> 49<br />

transactional Default: false<br />

Software- und Organisations-Service GmbH<br />

name on the target host. For files with the extension .exe a file set param_set_2<br />

is specified that contains parameters that are specific for<br />

this file set, as binary transfer and different source and target directories.<br />

Please, consider that parameter file sets cannot specify parameters that<br />

control the connection to a target host, i.e. all files are transferred between<br />

the same local and remote hosts. However, the transfer direction<br />

can be changed, e.g. by specifying a different operation parameter for<br />

a file set.<br />

Optional parameters for transfer control<br />

[optional] This parameter specifies if file transfers should be operated within a<br />

single transaction, i.e. either all files are successfully transferred or<br />

none. Should an error occur during a transfer operation then all transfers<br />

will be rolled back.<br />

atomic_suffix Default: ---<br />

When specifying the value true then the following applies:<br />

The parameter atomic_suffix has to be specified that causes<br />

target files to be created with a suffix such as "~" and that causes the<br />

respective files to be renamed to their target file name after the transfer<br />

of all files has been successfully completed. If at least one file out of<br />

a set of files cannot be transferred successfully then no files will be renamed,<br />

instead the temporarily created files are removed from the target<br />

system.<br />

The parameter remove_files that causes files to be removed<br />

after successful transfer will be effective only after all files have been<br />

successfully transferred. Otherwise no files will be removed.<br />

[optional] This parameter specifies whether target files should be created with a<br />

suffix such as "~", and should be renamed to the target file name after<br />

the file transfer is completed. This mechanism is useful if the target<br />

directory is monitored for incoming files by some application and if files<br />

are required to appear atomically instead of being subsequently written<br />

to.<br />

remove_files Default: false<br />

The temporary suffix is specified as the value of this parameter.<br />

This setting is recommended should target directories be monitored by<br />

an application or a Job Scheduler.<br />

[optional] This parameter specifies whether files on the FTP/SFTP server should be<br />

removed after transfer.<br />

skip_transfer Default: false


<strong>SOS</strong>FTP <strong>Documentation</strong> 50<br />

[optional] If this Parameter is set to true then all operations except for the transfer<br />

itself will be performed. This can be used to just trigger for files or to<br />

only delete files on the FTP/SFTP server.<br />

overwrite_files Default: true<br />

[optional] This parameter specifies if existing files should be overwritten.<br />

append_files Default: false<br />

Software- und Organisations-Service GmbH<br />

Should this parameter be used with force_files und should no files be<br />

transferred due to overwrite protection then an error will be raised stating<br />

that "no matching files" could be found.<br />

[optional] This parameter specifies whether the content of a source file should be<br />

appended to the target file should this file exist.<br />

force_files Default: true<br />

The parameter overwrite_files will be ignored if this parameter is<br />

specified with the value true.<br />

[optional] This parameter specifies whether an error should be raised if no files<br />

could be found for transfer.<br />

zero_byte_transfer Default: yes<br />

The number of files to be transferred is determined by the file_spec or<br />

file_path parameters and can be restricted by the overwrite_files<br />

parameter should this be specified with the value false.<br />

[optional] This parameter specifies whether zero byte files should be transferred<br />

and processed by subsequent commands. The following settings are<br />

available:<br />

recursive Default: false<br />

yes : Files with zero byte size are transferred (default).<br />

no : Files with zero byte size are transferred, should at least one<br />

of the files have more than zero byte size.<br />

strict : Files with zero byte size are not transferred. An error will<br />

be raised if any zero byte file is found.<br />

relaxed : Files with zero byte size will not be transferred.<br />

However, no error will be raised if this results in no files being transferred.<br />

Use of this parameter can be refined using the force_files parameter:<br />

should force_files have the value false, then processing will be<br />

treated as successful in the event of no files having been transferred.<br />

Note that the remove_files parameter has unrestricted validity. Files<br />

with zero byte size will be removed regardless of whether or not they<br />

have been transferred.<br />

[optional] This parameter specifies if files from subdirectories should be transferred<br />

recursively. Recursive processing is specified by one of the values<br />

yes or true.


<strong>SOS</strong>FTP <strong>Documentation</strong> 51<br />

check_size Default: true<br />

Software- und Organisations-Service GmbH<br />

Regular expression matches apply to files from subdirectories as specified<br />

by the parameter file_spec.<br />

Parameters for transfer verification<br />

[optional] This parameter determines whether the original file size and the number<br />

of bytes transferred should be compared after a file transfer and<br />

whether an error should be raised if they would not match.<br />

check_retry Default: 0<br />

[optional] This parameter specifies whether a file transfer should be repeated in<br />

order to ensure that the file was complete when the transfer started.<br />

This is relevant for Unix systems that allow read and write access to a<br />

file at the same time.<br />

check_interval Default: 60<br />

This parameter causes the size of the current file transfer and of the<br />

previous file transfer to be compared and repeats transferring one file<br />

up to the number of trials specified by this parameter. Should the file<br />

size of both transfers be the same, then it is assumed that the file was<br />

complete at the FTP/SFTP server.<br />

The interval between two trials to transfer a file is configured using the<br />

check_interval parameter.<br />

[optional] This parameter specifies the interval in seconds between two file transfer<br />

trials, if repeated transfer of files has been configured using the<br />

check_retry parameter.<br />

poll_timeout Default: 0<br />

Parameters for polling<br />

[optional] This parameter specifies the time in minutes, how long a file is polled<br />

for.<br />

poll_interval Default: 60<br />

If a file becomes available within the time specified then it will be transferred,<br />

otherwise an error "no matching files" will be raised.<br />

[optional] This parameter specifies the interval in seconds, how often a file is<br />

polled for within the duration that is specified by the parameter<br />

poll_timeout.<br />

poll_minfiles Default: 1<br />

[optional] This parameter specifies the number of files that have to be found during<br />

the polling period in order to cause the transfer to start. This pa-


<strong>SOS</strong>FTP <strong>Documentation</strong> 52<br />

replacing Default: ---<br />

Software- und Organisations-Service GmbH<br />

rameter is used exclusively with the parameters poll_timeout.<br />

Parameters for file processing<br />

[optional] Regular expression for filename replacement with the value of the parameter<br />

replacement.<br />

replacement Default: ---<br />

If the expression matches the filename then the groups found are replaced.<br />

a)<br />

For replacement "capturing groups" are used. Only the content of the<br />

capturing groups is replaced.<br />

Replacements are separated by a semicolon ";". Example:<br />

replacing= (1)abc(12)def(.*)<br />

replacement= A;BB;CCC<br />

Input file: 1abc12def123.txt<br />

Output file: AabcBBdefCCC<br />

b)<br />

If no "capturing groups" are specified then the entire match is replaced.<br />

Example:<br />

replacing= Hello<br />

replacement= 1234<br />

Input file: Hello_World.txt<br />

Output file: 1234_World.txt<br />

Requires the parameter replacement to be specified.<br />

[optional] String for replacement of matching character sequences within file<br />

names that are specified with the value of the parameter replacing.<br />

If multiple "capturing groups" shall be replaced then one replacement<br />

string per group has to be specified. These strings are separated by a<br />

semicolon ";":<br />

replacement= aa;[filename:];bb<br />

Supports masks for substitution in the file name with format strings that<br />

are enclosed with [ and ] . The following format strings are supported:<br />

[date: date format ]<br />

date format must be a valid Java data format string, e.g.<br />

yyyyMMddHHmmss , yyyy-MM-dd.HHmmss etc.<br />

[filename:]<br />

Will be substituted by the original file name.<br />

[filename:lowercase]


<strong>SOS</strong>FTP <strong>Documentation</strong> 53<br />

root Default: ---<br />

Software- und Organisations-Service GmbH<br />

Will be substituted by the original file name including the file extension<br />

with all characters converted to lower case.<br />

[filename:uppercase]<br />

Will be substituted by the original file name including the file extension<br />

with all characters converted to upper case.<br />

Requires the parameter replacing to be specified.<br />

[optional] The parameter specifies the directory in which this program is allowed<br />

to create temporary files. Temporary files are required if due to the parameter<br />

setting jump_host files have to be stored on an intermediary<br />

server and will be removed after completion of the transfer.<br />

alternative_host Default: ---<br />

Without this parameter the temporary directory is used as provided by<br />

the operating system.<br />

Parameters for alternative connections<br />

[optional] Alternative parameter for the primary parameter host.<br />

alternative_port Default: ---<br />

The alternative parameters are used solely should the connection to an<br />

FTP/SFTP server fail, e.g. if the server were not available or if invalid<br />

credentials were used.<br />

[optional] Alternative parameter for the primary parameter port.<br />

alternative_user Default: ---<br />

The alternative parameters are used solely should the connection to an<br />

FTP/SFTP server fail, e.g. if the server were not available or if invalid<br />

credentials were used.<br />

[optional] Alternative parameter for the primary parameter user.<br />

alternative_password Default: ---<br />

The alternative parameters are used solely should the connection to an<br />

FTP/SFTP server fail, e.g. if the server were not available or if invalid<br />

credentials were used.<br />

[optional] Alternative parameter for the primary parameter password.<br />

alternative_account Default: ---<br />

The alternative parameters are used solely should the connection to an<br />

FTP/SFTP server fail, e.g. if the server were not available or if invalid<br />

credentials were used.<br />

[optional] Alternative parameter for the primary parameter account.


<strong>SOS</strong>FTP <strong>Documentation</strong> 54<br />

alternative_remote_dir Default: ---<br />

Software- und Organisations-Service GmbH<br />

The alternative parameters are used solely should the connection to an<br />

FTP/SFTP server fail, e.g. if the server were not available or if invalid<br />

credentials were used.<br />

[optional] Alternative parameter for the primary parameter remote_dir.<br />

alternative_passive_mode<br />

The alternative parameters are used solely should the connection to an<br />

FTP/SFTP server fail, e.g. if the server were not available or if invalid<br />

credentials were used.<br />

Default: ---<br />

[optional] Alternative parameter for the primary parameter passive_mode.<br />

alternative_transfer_mode<br />

The alternative parameters are used solely should the connection to an<br />

FTP/SFTP server fail, e.g. if the server were not available or if invalid<br />

credentials were used.<br />

Default: ---<br />

[optional] Alternative parameter for the primary parameter transfer_mode.<br />

ssh_proxy_host Default: ---<br />

The alternative parameters are used solely should the connection to an<br />

FTP/SFTP server fail, e.g. if the server were not available or if invalid<br />

credentials were used.<br />

Parameters for SSH connections<br />

[optional] The value of this parameter is the host name or the IP address of a<br />

proxy that is used in order to establish a connection to the SSH server.<br />

The use of a proxy is optional.<br />

ssh_proxy_port Default: ---<br />

[optional] This parameter specifies the port number of the proxy, should a proxy<br />

be used in order to establish a connection to the SSH server.<br />

ssh_proxy_user Default: ---<br />

[optional] The value of this parameter specifies the user account for authentication<br />

by the proxy server should a proxy be used in order to connect to<br />

the SSH server.<br />

ssh_proxy_password Default: ---<br />

[optional] This parameter specifies the password for the proxy server user account,<br />

should a proxy be used in order to connect to the SSH server.<br />

ssh_auth_method Default: publickey<br />

[optional] This parameter specifies the authentication method for the SSH server -<br />

the publickey and password methods are supported.


<strong>SOS</strong>FTP <strong>Documentation</strong> 55<br />

ssh_auth_file Default: ---<br />

Software- und Organisations-Service GmbH<br />

Should the publickey authentication method be used, then the path<br />

name of the private key file has to be specified with the ssh_auth_file<br />

parameter. Should the private key file be secured by a passphrase then<br />

the passphrase has to be specified with the password parameter.<br />

For the password authentication method the password for the user account<br />

has to be specified using the password parameter.<br />

The authentication methods that are enabled depend on the SSH server<br />

configuration. Not all SSH servers are configured for password authentication.<br />

[optional] This parameter specifies the path and name of a user's private key file<br />

that is used for authentication with an SSH server.<br />

http_proxy_host Default: ---<br />

This parameter has to be specified should the publickey authentication<br />

method have been specified in the ssh_auth_method parameter.<br />

Should the private key file be secured by a passphrase, then the<br />

passphrase has to be specified using the password parameter.<br />

Parameters for SSL/TLS connections<br />

[optional] The value of this parameter is the host name or the IP address of a<br />

proxy used in order to establish a connection to the SSH server via<br />

SSL/TLS. The use of a proxy is optional and exclusively considered if<br />

the parameter protocol=ftps is used.<br />

http_proxy_port Default: ---<br />

[optional] This parameter specifies the port of a proxy that is used in order to establish<br />

a connection to the SSH server via SSL/TLS, see parameter<br />

http_proxy_host.<br />

jump_protocol Default: sftp<br />

Parameters used with Jump Hosts<br />

[optional] When using a jump_host then files are first transferred to this host and<br />

then to the target system. Different protocols (FTP/SFTP) can be used<br />

for these transfer operations.<br />

jump_host Default: ---<br />

This parameter expects ftp, sftp or ftps to be specified. If sftp is<br />

used, then the jump_ssh_* parameters will be considered.


<strong>SOS</strong>FTP <strong>Documentation</strong> 56<br />

[optional] When using a jump_host then files are first transferred to this host and<br />

then to the target system. Different protocols (FTP/SFTP) can be used<br />

for these transfer operations.<br />

jump_port Default: 22<br />

Software- und Organisations-Service GmbH<br />

Host or IP address of the jump_host from which or to which files should<br />

be transferred in a first operation.<br />

[optional] Port on the jump_host by which files should be transferred. For FTP this<br />

is usually port 21, for SFTP this is usually port 22.<br />

jump_user Default: ---<br />

[optional] User name for authentication with the jump_host.<br />

jump_password Default: ---<br />

[optional] Password for authentication with the jump_host.<br />

jump_proxy_host Default: ---<br />

[optional] The value of this parameter is the host name or the IP address of a<br />

proxy used in order to establish a connection to the jump host. The use<br />

of a proxy is optional.<br />

jump_proxy_port Default: ---<br />

[optional] This parameter specifies the port of a proxy that is used in order to establish<br />

a connection to the jump host, see parameter jump_proxy_host.<br />

jump_proxy_user Default: ---<br />

[optional] The value of this parameter specifies the user account for authentication<br />

by the proxy server should a proxy be used in order to connect to<br />

the jump host, see parameter jump_proxy_host.<br />

jump_proxy_password Default: ---<br />

[optional] This parameter specifies the password for the proxy server user account,<br />

should a proxy be used in order to connect to the jump host, see<br />

parameter jump_proxy_host.<br />

jump_ssh_auth_method Default: ---<br />

[optional] This parameter specifies the authentication method for the SSH server -<br />

the publickey and password methods are supported.<br />

jump_ssh_auth_file Default: ---<br />

When the publickey authentication method is used, then the path name<br />

of the private key file must be set in the jump_ssh_auth_file parameter.<br />

Should the private key file be secured by a passphrase then this<br />

passphrase has to be specified by the jump_password parameter.<br />

For the password authentication method the password for the user account<br />

has to be specified using the jump_password parameter.<br />

The authentication methods that are enabled depend on the SSH server<br />

configuration. Not all SSH servers are configured for password authentication.<br />

[optional] This parameter specifies the path and name of a user's private key file<br />

used for login to the SSH server of the jump_host.


<strong>SOS</strong>FTP <strong>Documentation</strong> 57<br />

jump_command Default: ---<br />

Software- und Organisations-Service GmbH<br />

This parameter must be specified if the publickey authentication method<br />

has been specified in the jump_ssh_auth_method parameter.<br />

Should the private key file be secured by a password, then this password<br />

has to be specified using the jump_password parameter.<br />

[optional] This parameter specifies a command that is to be executed on the SSH<br />

server. Multiple commands can be separated by the command delimiter<br />

that is specified using the jump_command_delimiter parameter.<br />

jump_command_script Default: ---<br />

[optional] This parameter can be used as an alternative to jump_command,<br />

jump_command_delimiter and jump_command_script_file. It contains<br />

script code which will be transferred to the remote host as a file and will<br />

then be executed there.<br />

jump_command_script_f<br />

ile<br />

Default: ---<br />

[optional] This parameter can be used as an alternative to jump_command,<br />

jump_command_delimiter and jump_command_script. It contains the<br />

name of a script file, which will be transferred to the remote host and<br />

will then be executed there.<br />

jump_command_delimit<br />

er<br />

Default: %%<br />

jump_ignore_error Default: false<br />

Command delimiter characters are specified using this parameter.<br />

These delimiters can then be used in the jump_command parameter to<br />

seperate multiple commands. These commands are then excecuted in<br />

separate SSH sessions.<br />

[optional] Should the value true be specified, then execution errors caused by<br />

commands on the SSH server are ignored. Otherwise such execution<br />

errors will be reported.<br />

jump_ignore_signal Default: false<br />

[optional] Should the value true be specified, then on Unix systems all signals will<br />

be ignored that terminate the execution of a command on the SSH<br />

server - if for example a command is terminated using kill.<br />

jump_ignore_stderr Default: false<br />

Note that by default errors will be reported for commands that are terminated<br />

by signals.<br />

[optional] This job checks if any output to stderr has been created by a command<br />

that is being executed on the SSH server and reports this as an error.<br />

jump_simulate_shell Default: false<br />

Should the value true be specified for this parameter, then output to<br />

stderr will not be reported as an error by the Job Scheduler.<br />

[optional] Should the value true be specified for this parameter, then a login to a<br />

shell is simulated to execute commands. Some scripts may cause prob-


<strong>SOS</strong>FTP <strong>Documentation</strong> 58<br />

jump_simulate_shell_pro<br />

mpt_trigger<br />

Software- und Organisations-Service GmbH<br />

lems if no shell is present.<br />

Default: ---<br />

[optional] The expected command line prompt. Using this prompt the program<br />

tries to find out if commands may be entered or have been carried out.<br />

If no prompt can be configured, then timeout parameters have to be<br />

used in order to check if the shell is ready to accept commands.<br />

jump_simulate_shell_log<br />

in_timeout<br />

Default: ---<br />

[optional] If no new characters are written to stdout or stderr after the given<br />

number of milliseconds, then it is assumed that the login has been carried<br />

out and that the shell is waiting for the next command.<br />

jump_simulate_shell_ina<br />

ctivity_timeout<br />

Default: ---<br />

[optional] If no new characters are written to stdout or stderr after the given<br />

number of milliseconds, then it is assumed that the command has been<br />

carried out and that the shell is waiting for the next command.<br />

classpath_base Default: ---<br />

Parameters for installation<br />

[optional] The parameter is used during installation of this program on a remote<br />

server with the parameter operation=install. This parameter specifies<br />

the path of the Java Runtime Environment (JRE) at the remote<br />

server and is used if on the remote server a JRE is not included in the<br />

system path.<br />

history Default: ---<br />

The path of the specified JRE is added to the start script at the remote<br />

server (sosftp.cmd respectively sosftp.sh).<br />

Parameters for history processing<br />

[optional] This parameter causes a history file to be written in CSV format. The<br />

path and name of the history file is specified as value for this parameter.<br />

A history record is created for each file that has been transferred.<br />

A history file contains the following columns:<br />

guid<br />

A unique identifier for the history entry. This identifier is used for checking<br />

of duplicate entries in combination with Job Scheduler for Managed<br />

File Transfer.


<strong>SOS</strong>FTP <strong>Documentation</strong> 59<br />

Software- und Organisations-Service GmbH<br />

mandator<br />

A character that denominates the mandator of a file transfer, see respective<br />

parameter.<br />

transfer_timestamp<br />

The point in time when the transfer took place.<br />

pid<br />

The process id of the current process that executes the file transfer, see<br />

parameter current_pid.<br />

ppid<br />

The process id of the parent of the process that executes the file transfer,<br />

see respective parameter.<br />

operation<br />

One of the operations send or receive, see respective parameter.<br />

localhost<br />

The name of the host on which this program is executed.<br />

localhost_ip<br />

The IP address of the host on which this program is executed.<br />

local_user<br />

The name of the user account for which this program is executed.<br />

remote_host<br />

The name of the host to/from which a transfer is executed, see parameter<br />

host.<br />

remote_host_ip<br />

The IP address of the host to/from which a transfer is executed, see<br />

parameter host.<br />

remote_user<br />

The name of the user account for the remote host, see parameter user.<br />

protocol<br />

The protocol can be either ftp, sftp or ftps, see respective parameter.<br />

port<br />

The port on the remote host, see respective parameter.<br />

local_dir<br />

The local directory to/from which a file has been transferred, see respective<br />

parameter.<br />

remote_dir<br />

The remote directory to/from which a file has been transferred, see respective<br />

parameter.<br />

local_filename<br />

For send operations this is the original file name on the local host.<br />

For receive operations this is the resulting file name on the local host<br />

optionally having applied replacement operations, see parameter replacing.<br />

remote_filename


<strong>SOS</strong>FTP <strong>Documentation</strong> 60<br />

history_repeat Default: 3<br />

Software- und Organisations-Service GmbH<br />

For send operations this is the resulting file name on the remote host<br />

optionally having applied replacement operations, see parameter replacing.<br />

For receive operations this is the original file name on the remote host.<br />

file_size<br />

The size of the transferred file in bytes.<br />

md5<br />

The value of the MD5 hash that is created from the file that was transferred.<br />

status<br />

The status can be either success or error.<br />

last_error_message<br />

Should an error have occurred then the last error message will be given<br />

in this column.<br />

log_filename<br />

The name of the log file, see respective parameter.<br />

[optional] The parameter is used in order to synchronize parallel write access to<br />

the history file by multiple instances of this program.<br />

history_repeat_interval Default: 1<br />

This parameter specifies the maximum number of repeat intervals when<br />

trying to write to the history file if the history file is locked due to parallel<br />

instances of this program.<br />

[optional] The parameter is used in order to synchronize parallel write access to<br />

the history file by multiple instances of this program.<br />

current_pid Default: ---<br />

This parameter specifies the the interval in seconds of repeated trials to<br />

write to the history file if the history file is locked due to parallel instances<br />

of this program.<br />

[optional] This parameter is used for Unix systems and - as opposed to other parameters<br />

- is usually specified in the start script sosftp.sh. The value<br />

of the environment variable $$ is assigned, that contains the current<br />

process id (PID).<br />

ppid Default: ---<br />

The process id is used when writing an entry to a history file for each<br />

transfer (see parameter history).<br />

[optional] This parameter is used for Unix systems and - as opposed to other parameters<br />

- is usually specified in the start script sosftp.sh. The value<br />

of the environment variable $PPID is assigned, that contains the process<br />

id of the current parent process (PPID).<br />

The parent process id is used when writing an entry to a history file for<br />

each transfer (see parameter history).


<strong>SOS</strong>FTP <strong>Documentation</strong> 61<br />

mandator Default: <strong>SOS</strong><br />

[optional] This parameter specifies the mandator for which a file transfer is effected.<br />

The mandator is added to an optional history file, see parameter<br />

history and has no technical relevance for the transfer.<br />

scheduler_host Default: ---<br />

[optional] This parameter specifies the host name or IP address of a server for<br />

which Job Scheduler is operated for Managed File Transfer.<br />

scheduler_port Default: ---<br />

Software- und Organisations-Service GmbH<br />

The contents of an optional history file (see parameter history), is<br />

added to a central database by Job Scheduler.<br />

This parameter causes the transfer of the history entries for the current<br />

transfer by UDP to Job Scheduler. Should Job Scheduler not be accessible<br />

then no errors are reported, instead, the contents of the history will<br />

automaticall be processed later on.<br />

[optional] The port for which a Job Scheduler for Managed File Transfer is operated,<br />

see parameter scheduler_host.<br />

scheduler_job_chain Default: scheduler_sosftp_history<br />

[optional] The name of a job chain for Managed File Transfer with Job Scheduler,<br />

see parameter scheduler_host. The job chain accepts history entries<br />

and performs an import into a central database.<br />

* Default: ---<br />

Additional parameters<br />

[optional] Any additional parameters that are not preceeded by keywords represent<br />

paths for files that should be transferred.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!