Modularizing Profiles with include directive

  • YADE's feature of importing profiles can be used to create generic parameter groups called "fragments".
  • YADE's fragments are small sets of parameters which by themselves can't be used for file transfer, but can be combined with other fragments to create a complete profile.
  • A transfer profile is a collection of parameters, e.g. of parameters such as source_host, target_host, file_spec etc. There is a terrific number of parameters in YADE that can combined with each other depending upon protocol etc.

Example 1: Profile without fragments: copy files from local host to target host using SFTP

[copy_to_sftp_server]
;; This is comment
operation       = copy
;;
source_host     = localhost
source_protocol = local
source_dir      = ${local_dir}
;;
target_host     = 8of9.sos
target_protocol = ftp
target_port     = 21
target_user     = kb
target_password = ****
ssh_auth_method = password
target_dir      = ${remote_dir}
;;
file_spec       = ^\.txt$

To execute a transfer with this profile from the command line type:

jade.sh -settings=name-of-your-configuration-file -profile=copy_from_sftp_server

Example 2: Profile with fragments: copy files from source host to localhost host using SFTP

;; localhost settings
[localhost_settings]
host     = localhost
protocol = local
local_dir      = ${local_dir}

;; 8of9.sos settings
[8of9.sos_settings]
host            = 8of9.sos
protocol        = ftp
port            = 21
user            = kb
password        = ****
ssh_auth_method = password
local_dir       = ${remote_dir}

;; profile with fragments
[copy_from_sftp_server]
;; 
operation              = copy
;;
;; include fragments 
source_include         = 8of9.sos_settings
target_include         = localhost_settings
;;
file_spec              = ^\.txt$

To execute a transfer with this profile from the command line type:

jade.sh -settings=name-of-your-configuration-file -profile=copy_from_sftp_server