FTP Storage
SqlBak-CLI allows sending the backups to an FTP Server.
{
"type" : ftp
"server_name": <string>,
"server_port": <server port.>
"user_name": <string>,
"user_password": <string>,
...
}
Mandatory parameters
type
Storage type where the backups will be stored, should be specified like: ftp.
server_name
FTP Server name, server DNS name or IP address should be specified.
user_name
User name to set FTP connection.
path
Path to folder on FTP Server.
Optional parameters
server_port
The server’s port can be specified, by default the port 21 is used.
ssl_mode
Secure Sockets Layer – secure protocol for file transfer. Default value is none.
VALUES:
none
– SSL will not be used.
implicit
– an older version of the protocol. The client connects to the server using SSL, so that a different port for it than the standard one should be opened. As a rule, port 990 is used.
explicit
– newer version of the protocol (rfc 4217). The connection is set through the regular FTP port. The client requests TLS by sending the AUTH command.
server_certificate_thumbprint
Can be encrypted. Server certificate thumbprint.
trust_server_certificate
Required if ssl_mode is not “none” and server_certificate_fingerprint is not defined. Specified only if ssl_mode is not “none.” Set True if you trust the server’s certificate. If False is specified, then the path to the certificate in the server_certificate_fingerprint field should be specified.
timeout
The length of time in milliseconds before the operation times out, by default: 1000.
user_password
User password to set FTP connection. The password can be encrypted.
is_passive
FTP operating mode can be specified here:
true
FTP works in passive mode.
false
FTP works in active mode (default).
is_emergency
Additional storage locations can be set and will be used if download to the primary location fails.
Examples
{
"source":{
"type":"mssql",
"data_source":".",
"trust_server_certificate":true,
"user_name":"sa",
"user_password":"my-sql-server-password",
"databases":{
"items":[
"DataOne",
"MediaOne"
]
}
},
"compression_settings":{
"is_enabled":false
},
"storages":[
{
"type":"ftp",
"server_name": "my-ftp.com",
"user_name": "ftp-user-name",
"user_password": "ftp-password-name",
"path":"backups/database",
"keep_settings":[
{
"backup_type":"full",
"hours":120
},
{
"backup_type":"differential",
"hours":10
}
]
}
]
}