Storage locations
section
The storage location section describes the data that is used to establish a connection to the storage locations that will be used to store backups. In this section, the backups retention period can also be specified.
Supported storage types
The type
parameter specifies a storage type. The following values are available:
Code | Name |
---|---|
folder | Local or network folder (smb protocol) |
ftp | FTP server |
sftp | Transfer file over SSH |
backblaze_b2 | Backblaze B2 Cloud Storage |
keep_settings
– backup retention duration setting
In the keep_settings
section, the rules to remove old backups can be set.
For each type of backup (full
, differential
, incremental
/transaction log
) a separate rule can be specified.
If a backup was successfully downloaded to a storage location, then an algorithm for searching and deleting obsolete backups will be launched for this backup object.
Note that sqlbak-cli does not “remember” when and how the backups were performed. The calculation of the backups that should be removed is made by searching in a storage location, and the date the backups were made is derived from the file name.
If a backup job has not been run, or the backup job has not been successfully completed, the application will not delete obsolete backups.
Rule content
backup_type
Backup type:
full
,differential
,incremental
/transaction log
.
days
The number of days after which a backup will be deleted.
hours
The number of hours after which the backup will be deleted (summed up with the number of days).
Emergency storage is_emergency
If the storage field is_emergency
is set to true
, then backups will be sent to this storage location only if they failed to be sent to the main storage location due to an error.
Examples
Store backups to a directory on a hard drive. Deleting full
backups after 120 hours, and differential
backups after 10 hours.
Store backups to Amazon S3. If the download fails, the backups will be stored in a local directory.