Xbcloud incremental backup to S3


I have a strange problem with xbcloud.

Ubuntu 20.04
xbcloud Ver 2.4.24 for Linux (x86_64) (revision id: b4ee263)

If I make a full backup to S3 then i can restore that.

Backup command:

mariabackup --defaults-file=/etc/mysql/mariadb.conf.d/50-server.cnf  --use-memory=6G --parallel=15 -uuser --password=password --backup --stream=xbstream --extra-lsndir=/sql_backups/$(date -I)_full_backup --target-dir=/sql_backups/$(date -I)_full_backup | xbcloud put --parallel=15 --storage=s
3 --s3-region='region' --s3-endpoint='s3.amazonaws.com' --s3-access-key='KEY' --s3-secret-key='SECRETKEY' --s3-bucket='mybucket' $(date -I)_full_backup

After this the recovery is OK.

The incremental command:

mariabackup --defaults-file=/etc/mysql/mariadb.conf.d/50-server.cnf  --use-memory=6G --parallel=15 -uuser --password=password --backup --stream=xbstream --extra-lsndir=/sql_backups/$(date -I)_inc_backup-$CURRTIME --target-dir=/sql_backups/$(date -I)_inc_backup-$CURRTIME --incremental-basedir=/sq
l_backups/"$LastFullBackup"_full_backup | xbcloud put --parallel=15 --storage=s3 --s3-region='region' --s3-endpoint='s3.amazonaws.com' --s3-access-key='KEY' --s3-secret-key='SECRETKEY' --s3-bucket='mybucket' $(date -I)_inc_backup-$CURRTIME

The incremental backup is also OK.


When I want to restore after an incremental backup i have this strange message.

211022 13:12:16 xbcloud: Successfully connected.
211022 13:12:20 xbcloud: Downloading 2021-10-22_full_b.00000000000000000000.
211022 13:12:20 xbcloud: Downloading 2021-10-22_full_backup/aria_log.00000001.00000000000000000000.
211022 13:12:20 xbcloud: Downloading 2021-10-22_full_backup/aria_log_control.00000000000000000000.
211022 13:12:20 xbcloud: Downloading 2021-10-22_full_backup/backup-my.cnf.00000000000000000000.

211022 13:12:20 xbcloud: S3 error message: The specified key does not exist.
211022 13:12:20 xbcloud: Download failed. Cannot download 2021-10-22_full_b.00000000000000000000.
211022 13:12:20 xbcloud: Download successfull 2021-10-22_full_backup/aria_log_control.00000000000000000000, size 102

For some reason it tries to download “2021-10-22_full_b.00000000000000000000.” , it was never there.

Any idea why works like this?

1 Like

Hi @gurdon.robert

xbcloud is suppose to work with xbstream format from percona xtrabackup. I see you are using mariabackup which has their own fork of xbstream format.

Can you check if the same issue happens while doing a backup of Percona Server or MySQL using xtrabackup + xbcloud ?

1 Like

Hi @Marcelo_Altmann

Unfortunately we are using MariaDB 10.3, as i know xtrabackup 2.4 is incompatible with this version of MariaDB.

1 Like