Xtrabackup run fails, indicating missed binary log file

Hello Forum,
I’m looking for some clues how to tackle following problem:

There are 2 MySQL nodes (let’s call them X and Y), each of them is using the following:

OS: AlmaLinux release 9.6
MySQL: 8.0.36-28 Percona Server
xtrabackup: 8.0.35-32 based on MySQL server 8.0.35
xbcloud: Ver 8.0.35-32

and executing backup of X from Y like:

Y >
sudo sh -c ‘xtrabackup --user=… --password=… --host=X --port=… --backup --compress --stream=xbstream --read-buffer-size=500M --extra-lsndir=/tmp --target-dir=/tmp’ | xbcloud put --storage=s3 --s3-access-key=… --s3-secret-key=… --s3-bucket=s3://… --s3-region=… --parallel=10 s3://…/mysql-backup-…

Almost immediately the xtrabackup stops and returns following message:

2025-06-26T19:14:18.239146-00:00 0 [Note] [MY-011825] [Xtrabackup] Selecting LSN and binary log position from p_s.log_status
xtrabackup: File ‘/var/lib/mysql/logs/binlogs/X-bin.000037’ not found (OS errno 2 - No such file or directory)
2025-06-26T19:14:18.673030-00:00 0 [ERROR] [MY-011825] [Xtrabackup] copy_file() failed.
250626 19:14:18 xbcloud: Upload failed: backup is incomplete.
Backup doesn’t contain last file with prefix xtrabackup_tablespaces in the cloud storage

However /var/lib/mysql/logs/binlogs/X-bin.000037 file exists on X node:
-rw-r----- 1 mysql mysql 157 Jun 26 19:14 /var/lib/mysql/logs/binlogs/X-bin.000037

Please advise,
with regards
bklk

Are you taking backup remotely?
Xtrabackup does not support a remote backup.
I can see that you are using --host option
Xtrabackup support streaming backup

This indicates that the binary log file that xtrabackup saw and wants to copy has disappeared. Did you purge binary logs? Typically, a backup lock is taken, so purging/deleting binary logs cannot happen.

If it happens again, please check binlog files.

Thank you both.
Yes, missing the --stream was the culprit.
Regards