Backup to S3 compatible (linode S3) not working

When running the BKP we are getting the following error:

BACKUP DATABASE test
TO S3 “s3://bucketname/backups/2024-03-12/”
CONFIG ‘{“compatibility_mode”: true,“endpoint_url”:“https://bucketname.us-east-1.linodeobjects.com”, “s3_force_path_style”: false}’
CREDENTIALS ‘{“aws_access_key_id”: “XXXXXXX”, “aws_secret_access_key”: “XXXXX”}’

Error:
RequestError: send request failed
caused by: Get “https://bucketname.bucketname.us-east-1.linodeobjects.com/?max-keys=1”: tls: failed to verify certificate: x509: certificate is valid for *.us-east-1.linodeobjects.com, *.website-us-east-1.linodeobjects.com, us-east-1.linodeobjects.com, website-us-east-1.linodeobjects.com, not bucketname.bucketname.us-east-1.linodeobjects.com

Looks like it’s repeating the bucketname into the URL. But the url already has the bucketname and it doesn’t accept to change it.

Update: already tried to change it to “endpoint_url”:“https://us-east-1.linodeobjects.com
but I get access denied

Hi, Thanks for reaching out! Can you please try running the same backup database command with compatibility_mode set to false ? You can find more information on compatibility mode in our documentation here: [Doc link].

Thank You,

Is there anyway we can take backup to our local system?.