Hello,
I am trying take backup using below syntax but getting errors :
xtrabackup --backup --databases="${DB}" --stream=xbstream --compress --compress-threads=2 --parallel=2 --user="${MYSQL_USER}" | tee -a "${BACKUP_DIR}/${BACKUP_FILE}.xbstream" | azcopy cp "${BLOB_URL}/$(hostname)/${BACKUP_FILE}.xbstream" --log-level=INFO --from-to=PipeBlob 2>&1 | tee -a "${BACKUP_DIR}/backup.log"
Error :
2025-05-07T14:14:19.620404-00:00 2 [Note] [MY-011825] [Xtrabackup] Compressing and streaming ./magento24/fts_0000000000084bf4_000000000016b103_index_1.ibd
2025-05-07T14:14:19.625512-00:00 2 [Note] [MY-011825] [Xtrabackup] Done: Compressing and streaming ./magento24/fts_0000000000084bf4_000000000016b103_index_1.ibd
xtrabackup: Error writing file '<unopen fd>' (OS errno 32 - Broken pipe)
2025-05-07T14:14:19.625694-00:00 2 [ERROR] [MY-011825] [Xtrabackup] failed to copy datafile ./magento24/fts_0000000000084bf4_000000000016b103_index_1.ibd
xtrabackup: Error writing file '<unopen fd>' (OS errno 32 - Broken pipe)
xb_stream_write_data() failed.
compress: write to the destination stream failed.
14:14:19 UTC - mysqld got signal 11 ;
Instance is up and running :
Uptime: 243 days 23 hours 40 min 18 sec
Remove the tee
usage, and test directly to azcopy:
xtrabackup --backup --stream=xbstream --compress --parallel=4 | azcopy cp - /path/bucket/backup.xbstream
If that works, then the problem is not with PXB, but with your usage of tee
in the pipes.
xtrabackup --backup --databases="${DB}" --stream=xbstream --compress --compress-threads=2 --parallel=2 --user="${MYSQL_USER}" | azcopy cp
error :
2025-05-08T07:54:04.588428-00:00 2 [Note] [MY-011825] [Xtrabackup] Done: Compressing and streaming ./magento24/catalog_product_link_attribute_varchar.ibd
xtrabackup: Error writing file '<unopen fd>' (OS errno 32 - Broken pipe)
2025-05-08T07:54:04.588610-00:00 2 [ERROR] [MY-011825] [Xtrabackup] failed to copy datafile ./magento24/catalog_product_link_attribute_varchar.ibd
xtrabackup: Error writing file '<unopen fd>' (OS errno 32 - Broken pipe)
xb_stream_write_data() failed.
compress: write to the destination stream failed.
07:54:04 UTC - mysqld got signal 11 ;
Most likely, you have hit a bug, but this error can also be caused by malfunctioning hardware.
Thread pointer: 0x0
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0 thread_stack 0x100000
xtrabackup: Error writing file '<unopen fd>' (OS errno 32 - Broken pipe)
ERROR : Problem with backup database mysql
I did some quick googl-ing, and it seems that azcopy does not support reading/copying from stdin. You might need to find a different tool, or I recommend you use xbcloud which fully supports streaming into azure.