Backup utility which uses OpenStack Swift's form post middleware to perform one-way file backups to object storage without privileged user credentials.
Using the form POST middleware for the first time normally requires multiple account configuration steps. backup2swift
attempts to automate this as much as possible. To create the form template used for backups:
source ./MyProject-openrc.sh
backup2swift setup my_backup_container > config.json
Then, after copying config.json to the system that needs to perform file backups:
backup2swift -c config.json --delete-after 2592000 monday-backup-files.tar.gz monday-backup-db.sql.xz
While you can build backup2swift
for each system you want to use, often a static x86_64 binary is much more useful. The version included with tagged releases is built using clux/muslrust.
As noted by the musltrust README, HTTPS support is compiled into the static binary, but the trusted certificate store location may vary between systems. If it is not where backup2swift
expects, then its HTTPS requests will fail.
These two environment variables can be set in order to specify the trusted certificate store location:
export SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt
export SSL_CERT_DIR=/etc/ssl/certs
OpenSSL's documentation has more details on how to use these variables.