s3 endpoint dont joint bucket

This commit is contained in:
peitingwei 2023-05-10 15:04:01 +08:00
parent 59deab39ca
commit 436b3a05e9
5 changed files with 5 additions and 0 deletions

View File

@ -54,6 +54,7 @@ func runArchive(cmd *cobra.Command, args []string) {
Region: aws.String(region),
Endpoint: aws.String(endpoint),
Credentials: credentials.NewStaticCredentials(access_key, secret_key, ""),
S3ForcePathStyle: aws.Bool(true),
})
if err != nil {
fmt.Printf("Connect S3 Error!\n%v\n", err)

View File

@ -54,6 +54,7 @@ func runRestore(cmd *cobra.Command, args []string) {
Region: aws.String(region),
Endpoint: aws.String(endpoint),
Credentials: credentials.NewStaticCredentials(access_key, secret_key, ""),
S3ForcePathStyle: aws.Bool(true),
})
if err != nil {
fmt.Printf("Connect S3 Error!\n%v\n", err)

View File

@ -68,6 +68,7 @@ func runArchive(cmd *cobra.Command, args []string) {
Region: aws.String(region),
Endpoint: aws.String(endpoint),
Credentials: credentials.NewStaticCredentials(access_key, secret_key, ""),
S3ForcePathStyle: aws.Bool(true),
})
if err != nil {
fmt.Printf("Connect S3 Error!\n%v\n", err)

View File

@ -51,6 +51,7 @@ func runBackup(cmd *cobra.Command, args []string) {
Region: aws.String(region),
Endpoint: aws.String(endpoint),
Credentials: credentials.NewStaticCredentials(access_key, secret_key, ""),
S3ForcePathStyle: aws.Bool(true),
})
if err != nil {
fmt.Printf("Connect S3 Error!\n%v\n", err)

View File

@ -52,6 +52,7 @@ func runRestore(cmd *cobra.Command, args []string) {
Region: aws.String(region),
Endpoint: aws.String(endpoint),
Credentials: credentials.NewStaticCredentials(access_key, secret_key, ""),
S3ForcePathStyle: aws.Bool(true),
})
if err != nil {
fmt.Printf("Connect S3 Error!\n%v\n", err)