Connection parameters to remote storage are located in the `storage_connects` block of the main config in the list format.
Each connection contains two mandatory parameters: a unique name and a set of connection parameters corresponding to the connection type.
To use storage such as S3 to provide backups, do the following:
1. Add a set consisting of a unique connection name and a set of connection parameters of type s3_params to the storage_connects main config block.
Example for connecting to AWS S3, in the storage_connects block of nxs-backup.conf.
storage_connects:
- name: s3_aws
s3_params:
bucket_name: backups_bucket
access_key_id: my_s3_ak_id
secret_access_key: ENV:S3_SECRET_KEY
endpoint: s3.amazonaws.com
region: us-east-1
2. Add backup storage options for the previously specified storage name to the storages_options block in the job parameters.
Example of backup storage on AWS S3:
storages_options:
- storage_name: s3_aws
backup_path: /files/desc
retention:
days: 30
weeks: 0
months: 12
The URL type of the schema is determined atomically, depending on the endpoint used. If the endpoint begins with the bucket's name, the URL is in the Virtual-hosted style.
# Unique name of a strage connection
name: string
# Limit the net speed to remote storage per second in `bytes`, `kb`, `mb`, etc. Example: "12mb".
# This option overrides the value set in "limist.net_rate" of `nxs-backup.conf`.
# If "0" is used, there is no limitation.
rate_limit: string
# Set of specific parmeters for connection to s3
s3_params: map
# The name of the bucket
bucket_name: string # Required
# S3 access key id
access_key_id: string # Required
# S3 secret key
secret_access_key: string # Required
# S3 endpoint
endpoint: string # Required
# S3 region
region: string # Required
# Determines whether https or http scheme will be used for connection
secure: bool # Default: true
# Enables deletion of the list of files in backup rotation with a single request. Otherwise, each file will be deleted through a separate request. Can be disabled if the storage is not fully compatible with AWS S3 v4 and does not implement all API methods
batch_deletion: bool # Default: true