Xbcloud wrong region in Authorization

Hi,
I’m using xtrabackup and xbcloud using docker (docker run percona/percona-xtrabackup) but I’m having trouble connecting to s3.

I’m using this command:

xbcloud put --storage=s3 --s3-endpoint=s3.eu-south-1.amazonaws.com –-s3-api-version=4 –-s3-storage-class=standard --s3-access-key=myaccess --s3-secret-key=mysecret --s3-bucket=mybucket –-s3-region=eu-south-1 --parallel=10 --verbose backupfile

And in the verbose log I get:

Host: s3.eu-south-1.amazonaws.com
Accept: */*
Accept-Encoding: gzip
Authorization: AWS4-HMAC-SHA256 Credential=myaccess/20220121/us-east-1/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=signature
X-Amz-Content-SHA256: sha256content
X-Amz-Date: 20220121T182407Z

As you can see from the authorization header it is reported the wrong region (us-east-1 instead of eu-south-1).
How can I fix this problem?

2 Likes

Hi @vadd98 Seems like you are having an issue with your parameters:

–-s3-api-version=4
–-s3-storage-class=standard
–-s3-region=eu-south-1

those three parameters are not properly setting -- those characters looks like two hyphens but they are not. This normally happens with copy and paste from documents/wiki pages.

xbcloud expects \x2D\x2D (--) to recorgnize the option as a parameter. On those arguments you are passing \xE2\x80\x93\x2D (–-) The first hyphen looks like a proper hypen but it is not.

Btw, if xbcould don’t recognize --s3-region parameter it will automatically set us-east-1 . Which is the case here.

Please retype your xbcloud command by hand without copying it and let us know.

1 Like

Oh yes, that’s was it. I didn’t realized they were not hyphens. Thanks!

1 Like