Skip to content
Smarter by Design.Simpler for Business

settings file-transport ​

The settings file-transport command manages the sending out of the files the device produces. Every record defines a destination: whether the files will be sent with e-mail, with FTP or with SCP, and to which server and which directory they will be written.

Unlike the live stream of the logs, this sending runs when a file is produced.

Command Summary ​

TR7 WEB-CLI · settings file-transport
# Tab after the command
admin@TR7LBWAF01> settings file-transport
add delete list show update
 
admin@TR7LBWAF01> settings file-transport list
admin@TR7LBWAF01> settings file-transport add name <name> transportType scp …
admin@TR7LBWAF01> settings file-transport update id <id> …
admin@TR7LBWAF01> settings file-transport delete <id>
admin@TR7LBWAF01>  

Required Fields ​

In the add command the CLI asks for the required fields one by one in the order below and does not show the next one until one is written. The fields are written with the field name and the value together. The conditionally required rows are asked only when the type written next to them is selected.

OrderFieldStatusValue
1nameRequiredA name specific to the record; the same name cannot be used in two records
2transportTypeRequiredemail — E-Mail · ftp — FTP · scp — SCP; the type-dependent fields are listed after this selection
3hostConditionally requiredOnly ftp and scp; the server the files will be written to
4usernameConditionally requiredOnly ftp and scp; the user that connects to the server
5passwordConditionally requiredOnly ftp and scp; the password of that user. It is not asked hidden, it is written on the command line
6remotePathConditionally requiredOnly ftp and scp; the target directory on the remote server
—--contactGroups.NRequired in the schemaOnly email; since it is a list field the CLI does not ask for it, at least one group must be given with --

When a -- field is added to the line, the conditionally required fields also switch to the -- prefixed writing; Tab shows the correct writing at every step.

In the update command the record to be edited is selected with id <id>; in the show and delete commands the identifier is written without the field name (settings file-transport delete <id>). The identifiers are taken from the list output.

The Content Fields Common to Every Type ​

FieldWhat it doesWhat is written after it
--sources.NSelects which files will be sentbackup — Backup Files. It is the only source defined in this version and it is selected by default; at least one source must remain
--backupTypes.NSelects which backups will be sentauto — the nightly backups taken by themselves · user — the backups the user creates. By default both are selected; at least one must remain

The E-mail Destination ​

The fields below are listed while transportType email is selected. The sending uses the mail server setting of the device.

FieldWhat it doesWhat is written after it
--contactGroups.NSelects which contact groups the file will be sent toThe contact group records; the recipients are resolved from the e-mail addresses of these groups. It is required in the schema, at least one group must be given
--languageSelects the language of the labels in the messageen (the default) · tr

The FTP and SCP Destination ​

The fields below are listed while transportType ftp or transportType scp is selected.

FieldWhat it doesWhat is written after it
--hostDetermines the server the files will be written toThe server name or IP address. It is required (see order 3)
--usernameDetermines the user name to be used while connecting to the serverA user name. It is required (see order 4)
--passwordDetermines the password of that userA password; it is written openly on the command line. It is required (see order 5)
--remotePathDetermines the target directory on the remote serverA directory path. It is required (see order 6)
--namespaceSelects which routing table the sending will go out fromA routing table (the default is 1)
--modeSelects whether the sending will be a file mirroring or a single file sendingsync mirrors the backup folder to the remote server and completes the missing files by itself (the default) · single sends only the file produced at that moment
--syncWindow.valDetermines how far back the mirroring will goA number (the default is 90). When it is left empty, the whole history is mirrored
--syncWindow.unitSelects the unit of that windowd (the default) · w · M. It is listed only while --mode sync

FTP Only ​

FieldWhat it doesWhat is written after it
--ftpPortDetermines the port of the FTP serverA port number (the default is 21)
--secureSelects how the connection will be encryptedexplicit — FTPS (Explicit), the default · implicit — FTPS (Implicit) · none — None (plain FTP), unencrypted

SCP Only ​

FieldWhat it doesWhat is written after it
--scpPortDetermines the port of the SCP serverA port number (the default is 22)

Examples ​

TR7 WEB-CLI · the file forwarding
# mirror the backups of the last 6 months with SCP
admin@TR7LBWAF01> settings file-transport add name backup-archive transportType scp \
--host 10.0.1.70 --scpPort 22 --username tr7 --password <password> \
--remotePath /archive/tr7 --mode sync --syncWindow.val 6 --syncWindow.unit M
 
# send only the user backups one by one with FTPS
admin@TR7LBWAF01> settings file-transport add name ftp-target transportType ftp \
--host 10.0.1.71 --ftpPort 21 --secure explicit \
--username tr7 --password <password> --remotePath /tr7 \
--mode single --backupTypes.0 user
 
# sending with e-mail
admin@TR7LBWAF01> settings file-transport add name backup-mail transportType email \
--contactGroups.0 <group> --language tr
admin@TR7LBWAF01>  

Things to Know ​

  • The name is asked first, then the type. The CLI asks for the name and transportType fields in order, and then, on the ftp and scp types, for the host, username, password and remotePath fields. The field set of the three types is different from each other.
  • The required fields do not take --. The fields in the order table are written with the field name and the value side by side; the optional fields are in the --field value format. When a -- field is added to the line, the conditionally required fields are also written with the -- prefix. The detail is on the API Commands page.
  • The password is not asked hidden. Since the password field in this command is not defined in the password format, it is written openly on the command line and appears in the command history.
  • On the e-mail type the recipient group is not asked by the CLI. --contactGroups.N is required in the schema but since it is a list field the command line does not ask for it; when transportType email is selected it must be added with --.
  • The sync mode repairs itself. --mode sync mirrors the backup folder to the remote server; the files that could not be sent before are completed on the next run. --mode single sends only the file produced at that moment.
  • The sync window limits the first transfer. When --syncWindow is given, only the backups that new are mirrored; when the field is left empty, the whole history is transferred and the first run can take very long.
  • The e-mail sending depends on the mail server setting. The recipient groups are selected here and the message path is defined in the settings email command. The contact groups are in the settings notification command.
  • The routing table is asked only on FTP and SCP. The e-mail sending uses the table in the mail server setting of the device.
  • Unencrypted FTP can be selected but is not recommended. --secure none does not encrypt the connection; since the backup files carry the whole of the configuration, an encrypted option should be preferred.
  • The source and backup type lists cannot be emptied. --sources.N and --backupTypes.N must each carry at least one value.
  • The logs are sent with a separate command. The stream of the system logs is in the settings log-transport command.