Can we stream backup to GCP by having MySQL server and Xtrabackup on two different hosts

Hi,

I am having MySQL Container in one pod and xtrabackup container in another POD. While I am trying to stream data to GCP I am getting below error. I am using the 8.0.35 version of MySQL and Xtrabackup.

Command used on the xtrabackup container:

xtrabackup --backup --stream=xbstream --target-dir=/tmp/xtrabackup --compress --compress-threads=1 --stream=xbstream --parallel=1 --host=“...” --user=root | xbcloud put --storage=google --google-endpoint=‘storage.googleapis.com’ --google-access-key=‘’ --google-secret-key=‘’ --google-bucket=‘’ --google-storage-class=’ --google-region=‘asia-south1’ --parallel= $(date “+%F-%H-%M-%S”)-backup-full

Error Logs:

2024-06-11T09:39:08.731849-00:00 0 [ERROR] [MY-011825] [Xtrabackup] file ‘/var/lib/mysql/binlog.000006’ is smaller than 273
2024-06-11T09:39:08.731993-00:00 0 [ERROR] [MY-011825] [Xtrabackup] copy_file() failed.
240611 09:39:09 xbcloud: [0] successfully uploaded chunk: 2024-06-11-09-38-15-backup-full/performance_schema/keyring_componen_202.sdi.zst.00000000000000000000, size: 950
240611 09:39:28 xbcloud: [0] successfully uploaded chunk: 2024-06-11-09-38-15-backup-full/performance_schema/keyring_componen_202.sdi.zst.00000000000000000001, size: 61
240611 09:39:28 xbcloud: Upload failed: backup is incomplete.
Backup doesn’t contain last file with prefix xtrabackup_tablespaces in the cloud storage

This is suspicious. Is this reproducible? Did you mount the mysql datadir into the PXB pod?

@matthewb ,

I aim to have a MySQL server on one pod and Xtrabackup on the other pod(PVC is not shared between two pods). After referring this ticket Xtrabackup: copy_file() failed - #2 by matthewb seems it is not possible.