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
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.
| Order | Field | Status | Value |
|---|---|---|---|
| 1 | name | Required | A name specific to the record; the same name cannot be used in two records |
| 2 | transportType | Required | email — E-Mail · ftp — FTP · scp — SCP; the type-dependent fields are listed after this selection |
| 3 | host | Conditionally required | Only ftp and scp; the server the files will be written to |
| 4 | username | Conditionally required | Only ftp and scp; the user that connects to the server |
| 5 | password | Conditionally required | Only ftp and scp; the password of that user. It is not asked hidden, it is written on the command line |
| 6 | remotePath | Conditionally required | Only ftp and scp; the target directory on the remote server |
| — | --contactGroups.N | Required in the schema | Only 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
| Field | What it does | What is written after it |
|---|---|---|
--sources.N | Selects which files will be sent | backup — Backup Files. It is the only source defined in this version and it is selected by default; at least one source must remain |
--backupTypes.N | Selects which backups will be sent | auto — 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.
| Field | What it does | What is written after it |
|---|---|---|
--contactGroups.N | Selects which contact groups the file will be sent to | The 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 |
--language | Selects the language of the labels in the message | en (the default) · tr |
The FTP and SCP Destination
The fields below are listed while transportType ftp or transportType scp is selected.
| Field | What it does | What is written after it |
|---|---|---|
--host | Determines the server the files will be written to | The server name or IP address. It is required (see order 3) |
--username | Determines the user name to be used while connecting to the server | A user name. It is required (see order 4) |
--password | Determines the password of that user | A password; it is written openly on the command line. It is required (see order 5) |
--remotePath | Determines the target directory on the remote server | A directory path. It is required (see order 6) |
--namespace | Selects which routing table the sending will go out from | A routing table (the default is 1) |
--mode | Selects whether the sending will be a file mirroring or a single file sending | sync 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.val | Determines how far back the mirroring will go | A number (the default is 90). When it is left empty, the whole history is mirrored |
--syncWindow.unit | Selects the unit of that window | d (the default) · w · M. It is listed only while --mode sync |
FTP Only
| Field | What it does | What is written after it |
|---|---|---|
--ftpPort | Determines the port of the FTP server | A port number (the default is 21) |
--secure | Selects how the connection will be encrypted | explicit — FTPS (Explicit), the default · implicit — FTPS (Implicit) · none — None (plain FTP), unencrypted |
SCP Only
| Field | What it does | What is written after it |
|---|---|---|
--scpPort | Determines the port of the SCP server | A port number (the default is 22) |
Examples
Things to Know
- The name is asked first, then the type. The CLI asks for the
nameandtransportTypefields in order, and then, on theftpandscptypes, for thehost,username,passwordandremotePathfields. 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 valueformat. 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
passwordfield 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.Nis required in the schema but since it is a list field the command line does not ask for it; whentransportType emailis selected it must be added with--. - The sync mode repairs itself.
--mode syncmirrors the backup folder to the remote server; the files that could not be sent before are completed on the next run.--mode singlesends only the file produced at that moment. - The sync window limits the first transfer. When
--syncWindowis 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 emailcommand. The contact groups are in thesettings notificationcommand. - 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 nonedoes 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.Nand--backupTypes.Nmust 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-transportcommand.
