阿里云(Aliyun)对象存储系统(OSS)

阿里巴巴OSS是一种加密、安全、经济高效且易于使用的对象存储服务,可让您在云中存储、备份和归档大量数据。

阿里巴巴 OSS 与 S3 兼容,因此它可以用作具有一些额外参数的 restic 存储库的存储提供程序。

  • 确定正确的 Alibaba OSS 区域端点- 类似如下内容 oss-eu-west-1.aliyuncs.com
  • 您还需要区域名称 - 这将是类似 oss-eu-west-1

您必须首先使用您的阿里巴巴 OSS 帐户的凭据设置以下环境变量。

export AWS_ACCESS_KEY_ID=<YOUR-OSS-ACCESS-KEY-ID>
export AWS_SECRET_ACCESS_KEY=<YOUR-OSS-SECRET-ACCESS-KEY>

现在,您可以使用此命令轻松初始化 restic 以使用 Alibaba OSS 作为后端。

./restic -o s3.bucket-lookup=dns -o s3.region=<OSS-REGION> -r s3:https://<OSS-ENDPOINT>/<OSS-BUCKET-NAME> init
enter password for new backend:
enter password again:
created restic backend xxxxxxxxxx at s3:https://<OSS-ENDPOINT>/<OSS-BUCKET-NAME>
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is irrecoverably lost.

例如,对于实际端点:

restic -o s3.bucket-lookup=dns -o s3.region=oss-eu-west-1 -r s3:https://oss-eu-west-1.aliyuncs.com/bucketname init
作者:Jeebiz  创建时间:2024-08-19 14:09
最后编辑:Jeebiz  更新时间:2024-08-20 17:39