Xbcloud command not found

Hello, I am trying to backup my files to Minio storage and while executing simple this command, I am getting xbcloud: command not found. Can you please tell me any mistake in the command?

sudo docker run --name percona-xtrabackup-2.4 --volumes-from e52da93bb982 percona/percona-xtrabackup:2.4 xtrabackup --backup --socket=/tmp/mysql.sock --stream=xbstream --extra-lsndir=/tmp --target-dir=/tmp --host= --user=root --password= --port= | xbcloud put --storage=s3 --s3-endpoint=‘https://:’ --s3-access-key=‘<access key’ --s3-secret-key=‘’ --s3-bucket=‘minio-bucket’ --parallel=10 $(date -I)-full_backup
xbcloud: command not found
xtrabackup: recognized server arguments:
xtrabackup: recognized client arguments: --backup=1 --socket=/tmp/mysql.sock --stream=xbstream --extra-lsndir=/tmp --target-dir=/tmp --host= --user=root --password=* --port=
xtrabackup: perl binary not found. Skipping the version check

1 Like

Hi @shrishail

Can you please check if you have the most up to date version of the docker image? I am checking and xbcloud is on path:

docker run --rm --name percona-xtrabackup-2.4  percona/percona-xtrabackup:2.4 sh -c "xbcloud --version"
xbcloud  Ver 2.4.27 for Linux (x86_64) (revision id: aae8e82)

Also, please check if you have it under /bin:

$ docker run --rm --name percona-xtrabackup-2.4  percona/percona-xtrabackup:2.4 sh -c "ls /bin/xbcloud"
/bin/xbcloud

Hi Marc,

Thanks for reply. Yes, I can see the same output as had shown.

$ sudo docker run --rm --name percona-xtrabackup-2.4 percona/percona-xtrabackup:2.4 sh -c “xbcloud --version”
xbcloud Ver 2.4.27 for Linux (x86_64) (revision id: aae8e82)
$ sudo docker run --rm --name percona-xtrabackup-2.4 percona/percona-xtrabackup:2.4 sh -c “ls /bin/xbcloud”
/bin/xbcloud

So, can you please tell me any issue in my command? Why it is saying xbcloud command not found

Try retyping the command (without copy and paste) to ensure you don’t have any hidden character. When I try the same command as yours, it works, so the binary is definetely there and on PATH:

$ docker run --name percona-xtrabackup-2.4 --volumes-from dbstore percona/percona-xtrabackup:2.4 xtrabackup --backup --socket=/tmp/mysql.sock --stream=xbstream --extra-lsndir=/tmp --target-dir=/tmp --host= --user=root --password= --port= | xbcloud put
230207 11:47:52 Backup name is required argument
xtrabackup: recognized server arguments: 
xtrabackup: [Warning] xtrabackup: Empty value for 'port' specified. Will throw an error in future versions
xtrabackup: recognized client arguments: --backup=1 --socket=/tmp/mysql.sock --stream=xbstream --extra-lsndir=/tmp --target-dir=/tmp --host= --user=root --password=* --port= 
xtrabackup: perl binary not found. Skipping the version check
230207 14:47:52 Connecting to MySQL server host: , user: root, password: set, port: not set, socket: /tmp/mysql.sock
Failed to connect to MySQL server: Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2).

230207 11:47:52 Backup name is required argument - this message comes from xbcloud.

The other thing is that you are setting a volume. Ensure the previous commands work with volume set:

docker run --rm --name percona-xtrabackup-2.4 --volumes-from e52da93bb982 percona/percona-xtrabackup:2.4 sh -c "xbcloud --version"
docker run --rm --name percona-xtrabackup-2.4 --volumes-from e52da93bb982 percona/percona-xtrabackup:2.4 sh -c "ls /bin/xbcloud"

Hi Marc,

Still I am getting the same issue even after typing entire command.

One thing is that, I am running the command on ubuntu, it should be fine right? or any change in the command based on OS?

Hi Marc, I think when I execute the command, OS is giving the error that command not found.

sudo docker run --name percona-xtrabackup-2.4 --volumes-from e52da93bb982 percona/percona-xtrabackup:2.4 xtrabackup --backup --socket=/tmp/mysql.sock --stream=xbstream --extra-lsndir=/tmp --target-dir=/tmp --host= --user=root --password= --port= | xbcloud put --storage=s3 --s3-endpoint=‘https://:’ --s3-access-key=‘<access key’ --s3-secret-key=‘’ --s3-bucket=‘minio-bucket’ --parallel=10 $(date -I)-full_backup

Can you please help us in moving forward.

I have searched on net for using | symbol in docker run command, nowhere its valid. Not sure how you have executed it. xbcloud is a utility inside a container and when I execute with | symbol how it will get executed inside a container? Some info is missing here.

I guess whatever is shown in the document is to execute on Linux prompt and not on docker shell prompt.

$ xtrabackup … | xbcloud put … → This has to be executed in OS prompt right?

Hi @shrishail . Try this:

sudo docker run --name percona-xtrabackup-2.4 --volumes-from e52da93bb982 percona/percona-xtrabackup:2.4 sh -c '
xtrabackup --backup --socket=/tmp/mysql.sock --stream=xbstream --extra-lsndir=/tmp --target-dir=/tmp --host= --user=root --password= --port= | xbcloud put --storage=s3 --s3-endpoint=https://: --s3-access-key=<access key --s3-secret-key= --s3-bucket=minio-bucket --parallel=10 $(date -I)-full_backup
'

just be careful with quotes. We are surrounding the sh -c '<COMMAND>' with single quotes. Make sure you do not use it or properly escape if you use them as part of COMMAND.

Let us know if it works.