SFTP Storage
SqlBak-CLI can store backups to SFTP Storage.
{
"type" : sftp
"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: sftp.
server_name
SFTP Server name, server DNS name or IP address should be specified.
user_name
User name to set SFTP connection.
path
Path to folder on SFTP Server.
Optional parameters
server_port
The server’s port can be specified, by default the port 22 is used.
timeout
The length of time in milliseconds before the operation times out, by default: 1000.
authentication_method
Authentication method to set the connection to SFTP. The default authentication method is Password.
VALUES:
password
– A password that is used to connect to SFTP should be specified.
public_key
– Authorization type via a public key will be used. To set a connection, only the private key in the ssh_private_key field should be specified.
user_password
User password to set SFTP connection. The password can be encrypted.
ssh_private_key
A private key that should be specified instead of the password if the public_key authorization type is used.
is_emergency
Additional storage can be set and will be used if download to primary fails.
ssh_private_key_password
Can be encrypted. The password for the SSH private key if specified.
Examples
{
"source": {
"type": "mssql",
"data_source" : ".",
"trust_server_certificate": true,
"user_name": "sa",
"user_password": "my-sql-server-password",
"databases": {
"items": ["DataOne", "MediaOne"]
}
},
"storages":
[
{
"type": "sftp",
"server_name": "host-with-ssh.com",
"user_name": "my-ssh-user",
"user_password": "my-ssh-password",
"path": ""
}
]
}