Skip to content

Backup utility which uses OpenStack Swift form post middleware

License

Notifications You must be signed in to change notification settings

uq-eresearch/backup2swift

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

backup2swift

Build Status Latest Release

Backup utility which uses OpenStack Swift's form post middleware to perform one-way file backups to object storage without privileged user credentials.

Usage

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

Static binary

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.

OpenSSL & Certificates

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.