Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
UNDER CONSTRUCTIONh1. Modularizing Profiles: include directive
General
JADE do log each and every file transfer in local csv file and an log4j format file. At the same time transfer file history can be sent to an background service.
Background service will insert the transfer history into log table.
An Example Transfer Profile
...
A profile definition for Server to Server transfer, from a sftp to a ftp server:
with global settings for log file and background service
jade_settings.ini file with settings for history csv, log and background service.
Code Block |
---|
[MailSettings]
file_notification_to = admin@example.com
file_notification_subject = JADE-Client mail
file_notification_body = This is a test.
mail_smtp = mail.example.com
[BackgroundService]
BackgroundServiceHost = 8of9.sos
BackgroundServicePort = 4210
SendTransferHistory = true
TransferMethod = TCP
[JADEHistory]
log_filename = $\{basedir\}/jade_history.log
HistoryFileName = $\{basedir\}/jade_history.csv
[globals]
include = MailSettings , JADEHistory, BackgroundService
title = Global Profile
basedir = C:\sos-berlin.com\jade
|
Code Block |
[ftp_server_2_server]
ssh_auth_method=password
source_user=kb
source_password=*****
source_ssh_auth_method=password
source_host=wilma.sos
source_protocol=sftp
source_port=22
target_user=test
target_password=*****
target_host=8of9.sos
target_protocol=ftp
target_port=21
file_spec=^.*\.txt$
operation=copy
log_filename=$\{TEMP\}/sosftphistory.log
|
In this example all files with the file name extension ".txt" should be transfered transferred from the server "wilma" via sftp to the server 8of9 by ftp. the folders are not explicitely explicitly specified and therefore the "home" folders of the user are selected.
Profile fragments
To make the profile more reusable and readable it is possible to reuse profiles snipets in the way like this:
...
JADE will write the transfer history into CSV, Log file and also send the log entry to Background service
The profiles for wilma and 8of9 are defined only once. They could be used as many time as needed in different transfer profiles. There is a "globals" profile as well.
...
Now we will specify the transfer profile again:
Code Block |
---|
[ftp_server_2_server] include = globals source_includeuser=wilmakb targetsource_include=8of9 operation=copy file_spec=^.*\.txt$ [ftp_more] target_password=***** source_ssh_auth_method=password source_host=wilma.sos source_protocol=sftp source_port=22 target_user=test target_password=***** target_host=8of9.sos target_protocol=ftp target_port=21 target_source_include=wilma sourcetarget_target_include=8of9 operation=movecopy file_spec=^.*\.(txt|pdf|dat)$ source_folder=/outbound/daily target_folder=/inbound/transfertxt$ |
The "include" parameter will include the named profiles in the order they are defined. In the first example wilma will be included as source and in the second example as target. The "globals" profile is included automatically, no need to specifiy specific it in an include parameter.
The profiles must be defined in the same settings file.
...