--s3-storage-class is not working.

Description

xtrabackup --backup --stream=xbstream --target-dir=/tmp --user="root" --password='pass' --safe-slave-backup --slave-info --compress --parallel=16 | xbcloud put --storage=s3 --s3-endpoint=s3.ap-northeast-1.amazonaws.com --s3-storage-class='STANDARD_IA' --s3-access-key='' --s3-secret-key='' --s3-bucket="test" --parallel=16 test

I tried to back up with --s3-storage-class='STANDARD_IA' but the uploaded objects storage class is 'STANDARD'.

Screenshot

スタンダード mean STANDARD is not STANDARD_IA.

Environment

MySQL: 8.0.22

XtraBackup: 8.0.22-15

Smart Checklist

Activity

Show:

rarirure luis December 18, 2020 at 1:10 PM

ah... sorry.

It's working perfectly! Thank you quick response.

Marcelo Altmann December 18, 2020 at 11:24 AM

Hi  . Your connection to s3 api is returning bad request:

* About to connect() to hasegawa-test.s3.ap-northeast-1.amazonaws.com port 443 (#0) * Trying 52.219.4.115... * Connected to hasegawa-test.s3.ap-northeast-1.amazonaws.com (52.219.4.115) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 * Server certificate: * subject: CN=*.s3-ap-northeast-1.amazonaws.com,O="Amazon.com, Inc.",L=Seattle,ST=Washington,C=US * start date: Aug 27 00:00:00 2020 GMT * expire date: Sep 01 12:00:00 2021 GMT * common name: *.s3-ap-northeast-1.amazonaws.com * issuer: CN=DigiCert Baltimore CA-2 G2,OU=www.digicert.com,O=DigiCert Inc,C=US > HEAD / HTTP/1.1 Accept: */* Accept-Encoding: gzip Host: hasegawa-test.s3.ap-northeast-1.amazonaws.com X-Amz-Content-SHA256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 X-Amz-Date: 20201218T101928Z X-Amz-Storage-Class: STANDARD_IA < HTTP/1.1 400 Bad Request < x-amz-bucket-region: ap-northeast-1 < x-amz-request-id: BB6BA2FE28EDA60E < x-amz-id-2: F4njDZm9fdqFPR6UnnGXb/g8lq5PVAzGOAat7yqTlsBlOkXfkJewjUTasJtS7tZo8RAQZ7tXkOE= < Content-Type: application/xml < Transfer-Encoding: chunked < Date: Fri, 18 Dec 2020 10:19:28 GMT < Connection: close < Server: AmazonS3 < * Closing connection 0

That indicates issues with regions. Can you force --s3-region as per my previous reply:

xtrabackup --backup --stream=xbstream --target-dir=/tmp --user="root" --password='pass' --safe-slave-backup --slave-info --compress --parallel=16 | xbcloud put --storage=s3 --s3-endpoint=s3.ap-northeast-1.amazonaws.com --s3-storage-class='STANDARD_IA' --s3-access-key='' --s3-secret-key='' --s3-bucket="test" --parallel=16 --s3-region=ap-northeast-1 test

rarirure luis December 18, 2020 at 10:28 AM

Yes --s3-bucket="test" is masked. In fact, The region between --s3-endpoint and --s3-bucket is the same.

I deleted the Authorization header and changed the bucket name from the log just in case.

output file

Marcelo Altmann December 18, 2020 at 10:13 AM

Hi  . Can you please make sure you are connecting to the same s3 region as your bucket:

xtrabackup --backup --stream=xbstream --target-dir=/tmp --user="root" --password='pass' --safe-slave-backup --slave-info --compress --parallel=16 | xbcloud put --storage=s3 --s3-endpoint=s3.ap-northeast-1.amazonaws.com --s3-storage-class='STANDARD_IA' --s3-access-key='' --s3-secret-key='' --s3-bucket="test" --parallel=16 --s3-region=XXXXX test

If that still doesn't work, please send us the full output of xbcloud with --verbose flag.

Not a Bug

Details

Assignee

Reporter

Priority

Smart Checklist

Created December 18, 2020 at 10:06 AM
Updated March 6, 2024 at 6:46 PM
Resolved December 18, 2020 at 1:17 PM

Flag notifications