Introducing xbcloud: Azure Blob Storage Support in Percona XtraBackup


Percona XtraBackup delivers the xbcloud binary – an auxiliary tool to allow users to upload backups to different cloud providers directly.

Today we are glad to announce the support of the Azure Blob storage to xbcloud.

This new feature will allow you to upload/download backups to Azure Blob storage. You would need an Azure storage account and access key. Check out this blog post on how to get one through the Azure portal.

This new functionality is available in the release of Percona XtraBackup 8.0.27 and will be available in Percona XtraBackup 2.4.25.

You can install xbcloud and XtraBackup via the percona-release package configuration tool. See the Percona Documentation for further details.

The Following Options are Added in xbcloud:

Azure storage account.
Azure container name.
Azure access key.
Azure cloud storage endpoint.
Azure cloud tier for backup.
Xbcloud doesn’t set the default value and the default value depends on the account tier. See azure documentation for more details.

Only to test your backup against azurite emulator
To run against azurite emulator

 It can work with the default credentials provided by azurite. For example, it uses as the default endpoint, which can be overwritten by –azure-endpoint. Users can also  provide –azure-access-key,  –azure-storage-account, –azure-container-name.

Environment Variables

The following environment variables are recognized. xbcloud maps them automatically to corresponding parameters applicable to azure storage.


Examples of the xbcloud Commands

Backup to xbcloud

xtrabackup –backup –stream=xbstream –target-dir= $TARGET_DIR | xbcloud put backup_name –azure-storage-account=pxbtesting –azure-access-key=$AZURE_KEY –azure-container-name=test –storage=azure

Restore Backup from xbcloud

xbcloud get backup_name  –azure-storage-account=$STORAGE_ACCOUNT –azure-access-key=$AZURE_KEY –azure-container-name=test –storage=azure –parallel=10 2>download.log | xbstream -x -C restore 

Delete Backup from xbcloud

xbcloud delete backup_name –azure-storage-account=$STORAGE_ACCOUNT –azure-access-key=$AZURE_KEY –azure-container-name=test –storage=azure

Shortcut Restore

xbcloud get azure://test/backup_name …

You can use all existing options for xbcloud like parallel, max-retries. See more details xbcloud documentation and help section.