databacker / mysql-backup

image to enable automated backups of mysql databases in containers
648 stars 185 forks source link

Support for storing files to Alibaba Cloud OSS via awscli #232

Open WongSaang opened 1 year ago

WongSaang commented 1 year ago

Benefit from OSS compatibility with the S3 API

https://www.alibabacloud.com/help/en/oss/developer-reference/compatibility-with-amazon-s3-1/?spm=a2c63.p38356.0.0.97ba41a0Ft7InT

deitch commented 1 year ago

Given that it is compatible with s3, why do we need to make any changes? Can we not just use s3://bucketname.host.com/path? The scheme in that URL (s3) is a protocol, so it covers it.

WongSaang commented 1 year ago
  1. OSS requires a separate configuration: aws configure set s3.addressing_style virtual
  2. If a user needs to store files on both AWS and OSS simultaneously, and their access keys are different, an independent profile needs to be added for OSS
deitch commented 1 year ago

OSS requires a separate configuration: aws configure set s3.addressing_style virtual

Is that not the default by now?

If a user needs to store files on both AWS and OSS simultaneously, and their access keys are different, an independent profile needs to be added for OSS

Would that not be an issue if I wanted to store it in 2 separate actual AWS S3 buckets with 2 separate profiles as well? If I pass s3://bucket1.amazonaws.com/foo and s3://bucket2.amazonaws.com/bar, and each of those is a different account with different credentials, or different endpoints, I have the same issue? And if I have 2 or 3 distinct OSS credentials?

If so, then this isn't a question of, "how do I provide different credentials to OSS and AWS?", but rather, "how do I support multiple s3-protocol targets, each with different credentials and/or configurations?"

Is that correct?