JobMode 50 – SFTP put
Parameter |
Value |
---|---|
File Number |
* |
Source File |
<TransInputDirectory>/<TransFileNameMask> |
Output |
sftp://<TransShare>[:/<TransWorkDir>]/*.* |
Configuration Parameters |
<MaximumFilesSpool> <TransAckFileContent> <TransAckFileExtension> <TransCheckMinimumDiskFree> <TransChmod> <TransDeleteTransferedFiles> <TransIgnoreConnectErrors> <TransInputDirectory> <TransRenameFileTo> <ZeroByteFileCheck> |
Table 189: Transfer: JobMode 50 – SFTP put |
In contrast to the other SFTP modes this JobMode copies items to a remote system (instead of fetching them). These items (files and directories) must be located in the directory <TransInputDirectory> and they must match the naming pattern <TransFileNameMask>. If this parameter value is empty, any file with the suffix <IndexFileExtension> is transferred. If only a single file is transferred, it can also be renamed to <TransRenameFileTo>. The option <TransDeleteTransferedFiles> determines if successfully transferred files are deleted in the source directory.
This JobMode is based on automated file transfers. This requires the setup of public/private key authentication without a password (cue: ssh-keygen -t rsa).
An OK file can be generated after the transfer. Its content is a constant text or the MD5 checksum of the file. The file extension is specified by <TransAckFileExtension>. No OK file is generated without a defined extension.
To ensure that there is enough disk space on the peer side, a minimum size can be specified with <TransCheckMinimumDiskFree>. If this value is set, a remote SSH connection is attempted with the execution of the commands “uname; df –k <TransWorkDir>”. For this purpose the user must have a shell with permissions. In case of low disk space processing is halted and retried later.
Example configuration for sftp://sysadm@53.113.173.116:/cache/input
TransBinary = /bin/sftp TransUserName = sysadm TransShare = 53.113.173.116 TransWorkDir = /cache/input TransAcceptLogFile = <ColdLogsBaseDirectory>/<SpoolType>/trans_<SpoolType>.log TransInputDirectory = <ColdDocsBaseDirectory>/<SpoolType>/<SpoolType.Generation> TransIgnoreConnectErrors = No TransDeleteTransferedFiles = Yes TransFileNameMask = <SpoolType.Generation>.zip TransAckFileContent = MD5 TransAckFileExtension = ok TransCheckMinimumDiskFree = 0 TransChmod = 666 MaximumFilesSpool = 1