To use storage such as SCP/SFTP to provide backups, do the following.
1. Add a set consisting of a unique connection name and a set of connection parameters of type scp_params to the storage_connects main config block.
Example for connecting to SFTP storage on 192.168.0.1 server, in the storage_connects block of nxs-backup.conf.
storage_connects:
- name: scp_test
scp_params:
host: 192.168.0.1
port: 22
user: sftp_user
password: ENV:SFTP_USER_PASSWORD
connection_timeout: 10
2. Add backup storage options for the previously specified storage name to the storages_options block in the job parameters.
storages_options:
- storage_name: scp_test
backup_path: /databases/mysql
retention:
days: 30
weeks: 0
months: 12
`scp_params` reference for nxs-backup.conf:
scp_params: map
# SSH host
host: string # Required
# SSH port
port: int # Default: 22
# SSH username
user: string # Required
# SSH user password
password: string # Optional
# Path to SSH private key instead of password
key_file: string # Optional
# SSH connection timeout seconds
connection_timeout: int # Default: 10