Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Backrest fails to connect to Tencent Cloud COS even though Restic command works, ignoring RESTIC_OPTSΒ #1238

@linfuluan

Description

@linfuluan
Image Image

🚨 Issue Description

I'm using Backrest 1.13.0 on Armbian (ARM64) and Windows10 x64 system , trying to connect to Tencent Cloud COS (ap-guangzhou region) as the backup repository, but I keep getting the error:

`Stat: The bucket you are attempting to access must be addressed using COS virtual-styled domain.

The confusing part is that the exact same Restic command works perfectly when run directly in the terminal, but fails when executed through Backrest's UI.


πŸ“‹ Environment Details


βœ… Working Scenario (Terminal)

When I run this command directly in the shell, it connects successfully to the COS repository:
bash
export AWS_ACCESS_KEY_ID="ACCESS_KEY_ID"
export AWS_SECRET_ACCESS_KEY="SECRET_ACCESS_KEY"
restic init -r s3:https://cos.ap-guangzhou.myqcloud.com/linfuluantest-1300915121/PC2/ -o s3.bucket-lookup=dns -o s3.region=ap-guangzhou

Output: The repository is opened normally, no errors.

❌ Failing Scenario (Backrest UI)
When I configure the same repository in Backrest with these settings:
Repository URI: s3:https://cos.ap-guangzhou.myqcloud.com/linfuluantest-1300915121/PC2/
Password: [my repo password]
Environment Variables:
AWS_ACCESS_KEY_ID=AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY=AWS_SECRET_ACCESS_KEY
RESTIC_OPTS=-o s3.bucket-lookup=dns -o s3.region=ap-guangzhou
Testing the connection fails with:
Stat() returned error: The bucket you are attempting to access must be addressed using COS virtual-styled domain
It seems the RESTIC_OPTS parameter s3.bucket-lookup=dns is not being applied correctly when Backrest executes the Restic command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions