Export a segment using S/FTP delivery
You can now use CSV, TSV, Segment Export, and Segment Export with Header using FTP and SFTP protocols to export segment files from the client (workstation) to the server.
Setting up S/FTP Export configuration files
To set the export configuration, two new export configuration files were added to set up an FTP or SFTP connection, allowing the Server details to be picked from the FTPServerInfo.cfg file and the credentials will be picked from FTPUserCredentials folder (corresponding to the Server Name given in the command arguments).
-
Set the FTPServerInfo.cfg file.
Enter the FTP server information and set connection retries allowed from the workstation. Edit from the workstation or the server at Server\Addresses\Export\ FTPServerInfo.cfg file.
code language-none FTP Servers = vector: 1 items 0 = ftpServerInfo: Address = string: Name = string: Port = int: 21 Connect Retries = vector: 1 items 0 = connectServerRetries: Retries = int: 0 Server Name = string:
-
Set the FTPUserCredentials.cfg file.
Enter user credentials to connect to servers using the Server\Admin\Export\ FTPUserCredentials.cfg file. This file contains user credentials needed to connect to servers and can only be edited from server and not from workstation (client).
code language-none FTP User Credentials = vector: 1 items 0 = ftpUserCredInfo: User Name = string: User Password = EncryptedString: Server Name = string: Public Key Path = string: Private Key Path = string: Passphrase = EncryptedString:
note note NOTE Ensure that SSH keys you generate for authentication are in the format identical to those that are generated when you use SSH Keygen command. Example for generating SSH keys using keygen: code language-none ssh-keygen -t rsa -b 4096 -C "<label>"
There are six parameters in the FTPUserCredentials.cfg file required for various FTP or SFTP transfers.
- User Name
- User Password
- Server Name
- Public Key Path
- Private Key Path
- Passphrase
table 0-row-2 1-row-2 2-row-2 3-row-2 Protocol Parameters FTP Set parameters 1, 2, 3. SFTP using password authentication Set parameters 1, 2, 3 when transfer uses password authentication (-p in the command arguments). SFTP using key authentication Set parameters 1, 2, 3, 4, 5, 6 when transfer uses key authentication (-k in the command arguments).
Setting the FTP and SFTP Export Commands
-
Open an export table.
From the Workstation, right-click a Detail Table and choose one of the export types—CSV , TSV, Segment Export, or Segment Export with Header. Or open the .export file from a command-prompt and edit (see Configuring Segments for Export).
-
In the Command field, set it to point to the export executable:
code language-none ExportIntegration.exe
-
Set the Command Arguments fields as shown below for the protocol and authentication required:
FTP
code language-none <Command Arguments> set to <ftp "%file%" ServerName ServerDestinationPath>
SFTP (if using password for authentication)
code language-none <Command Arguments> set to <sftp "%file%" ServerName ServerDestinationPath -p>
SFTP (if using keys for authentication)
code language-none <Command Arguments> set to <sftp "%file%" ServerName ServerDestinationPath -k>
All Command Arguments are mandatory and need to be entered as shown.
S/FTP export using private/public keys
To implement the FTP and SFTP Export using private and public keys, place the configuration files in these folders:
- Place FTPServerInfo.cfg in the Server/Addresses/Export/ folder.
- Place FTPUserCredentials.cfg in the Server/Admin/Export/ folder.
Six parameters are included in the FTPServerInfo.cfg file:
- User Name
- User Password
- Server Name
- Public Key Path
- Private Key Path – Place the private key path in the configuration file without the extension, for example:
Private Key Path = string: E:\Server\campaign\campaignprivatekey
- Passphrase
FTP uses parameters 1, 2, and 3.
SFTP uses parameters 1, 2, and 3 when the transfer uses password authentication.
SFTP uses all six parameters when the transfer is done using key authentication. For example, if you are using keys for authentication:
‘Command Arguments’ = sftp “%file%” ServerName ServerDestinationPath -k
The configuration files need to be in the correct location.