Configuration¶
All configuration files are INI-style files.
In the tables below strings in single quotes must be given literally (case insensitive) and without the quotes.
The paths mentioned in the configuration files must be either absolute or relative to the working directory of the filetransfer process.
See: example Configuration files
Changed in version 0.6.0: - Host configuration is now only allowed in
host configuration files.
hosts_cfg
in the application configuration
and host_id
in the sections [source] and [target] in
job configurations are not optional any more
when using FTP, FTPS or SFTP.
- SFTP authentication keyfiles in host configurations
must now have their type declared with key_type
Changed in version 0.7.0: - The password option in host configurations is now required except
for SFTP when an authentication key is used.
- Option name
moved from section [notify]
to the new section [job]
in job configuration.
Application Configuration¶
This configuration contains some global properties. It is the file
that is set with the --config
option or the FILETRANSFER_CFG
environment variable (see: Using filetransfer).
[global] |
required |
|
|
path to directory with job configuration files |
required |
|
extension for job configuration files |
optional (default: |
|
path to hosts configuration file |
required if FTP, FTPS or SFTP is used
see: Hosts Configuration
|
|
‘yes’ | ‘no’ |
collect data about transferred files and errors (default: |
|
path to directory with mail configuration files |
required if customized emails are used (see: Emails customization) |
|
path to directory for lock files |
required if |
[logging] |
optional |
|
|
path to base directory for log files |
if not set the logging messages will go to the standard error stream |
|
‘yes’ | ‘no’ |
|
|
format string |
default:
%(asctime)s %(levelname)-8s %(message)s see: LogRecord attributes
|
|
log level name |
default:
INFO (see: Logging Levels)
|
|
‘yes’ | ‘no’ |
disable logging (default: |
[sftp] |
optional |
|
|
path to RSA private key file |
required if SFTP is used and |
|
password for |
required if |
|
path to DSA private key file |
required if SFTP is used and |
|
password for |
required if |
|
path to ECDSA private key file |
required if SFTP is used and |
|
password for |
required if |
|
path to Ed25519 private key file |
required if SFTP is used and |
|
password for |
required if |
|
path to known_hosts file |
required if SFTP is used and |
[mail] |
SMTP config |
optional |
|
(dns-name | ip)[:port] |
required: SMTP server |
|
‘STARTTLS’ | ‘TLS’ |
default: insecure connection |
|
username |
required |
|
password |
required |
|
from email address |
required |
[notify] |
optional |
|
|
mail configuration file |
default: |
|
comma separated list of email addresses |
receipients to notify if a job succeeded (default: empty list) |
|
comma separated list of email addresses |
receipients to notify if there was an error (default: empty list) |
|
comma separated list of email addresses |
receipients to notify in both cases (default: empty list) |
Job Configuration¶
A job configuration file must have a name of the form JOB_ID.cfg
(e.g. job001.cfg
where job001
is the job id; the extension .cfg
can
be changed in the application configuration) and it must be
saved in the jobs_dir
directory as defined in the application configuration.
[job] |
optional |
|
|
job name |
will be shown in the email (default: job id) |
|
info about the job |
optional; will be shown in the email |
|
‘yes’ | ‘no’ |
collect data about transferred files and errors (default: value set in the application configuration); the list will be shown in the notification email |
|
‘yes’ | ‘no’ | an arbitrary lock name |
if set to |
|
file name |
the job will only run if this file is present in the source directory (it will not be transferred but deleted when the job finishes successfully) |
|
number of retries after the first attempt failed |
except for configuration errors the whole job will re-run up to |
|
‘yes’ | ‘no’ |
disable logging (default: value of |
|
log level name |
default: value of
log_level in section [logging] in the application configuration(see: Logging Levels)
|
[source] |
||
|
host id |
required for FTP, FTPS, SFTP
see: Hosts Configuration
if omitted
path must be on the local filesystem |
|
path to source directory |
required |
|
one or more filepatterns (comma separated) |
required (UNIX shell-style wildcards pattern) |
|
one or more filepatterns (comma separated) |
default: |
|
‘yes’ | ‘no’ |
default: |
|
‘yes’ | ‘no’ |
default: |
[target] |
||
|
host id |
required for FTP, FTPS, SFTP
see: Hosts Configuration
if omitted
path must be on the local filesystem |
|
path to target directory |
required |
|
‘dot’ | ‘ext:’.ext | ‘dir:’subdir |
default: no temporary files are used |
[notify] |
optional |
|
|
mail configuration file |
default: |
|
comma separated list of email addresses |
receipients to notify if the job succeeded (added to list from application configuration) |
|
comma separated list of email addresses |
receipients to notify if there was an error (added to list from application configuration) |
|
comma separated list of email addresses |
receipients to notify in both cases (added to list from application configuration) |
Hosts Configuration¶
A hosts configuration contains sections each of them defining a configuration of
a host. Such a host configuration can be referenced by setting the
host_id
in the [source]
and [target]
sections in
a job configuration to the section name.
[{host_id}] |
host_id must be unique |
|
|
‘FTP’ | ‘FTPS’ | ‘SFTP’ |
required |
|
(dns-name | ip)[:port] |
required |
|
username |
required |
|
password |
required (SFTP: only if no authentication key is used) |
|
timeout in seconds |
optional; default: |
|
‘yes’ | ‘no’ |
optional for FTP/S; default: |
|
‘yes’ | ‘no’ |
optional for FTPS; default: |
|
‘yes’ | ‘no’ |
optional for FTP/S; default: |
|
interval in seconds |
optional for FTP/S; default: |
|
‘RSA’ | ‘DSA’ | ‘ECDSA’ | ‘Ed25519’ |
required for SFTP if an authentication key is used; if |
|
path to private key file |
optional for SFTP |
|
password for |
optional for SFTP (not used if |
|
path to known_hosts file |
required for SFTP if not set in the application configuration |