-
Notifications
You must be signed in to change notification settings - Fork 237
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use aws-cli * aws lib * add post_backup script * fix build * K8SPXC-1475 use aws cli * rename function * add aws cli for pxc 5.7 backups * add aws cli for PXC 8.4 backup * remove debug
- Loading branch information
Showing
13 changed files
with
125 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
set -o errexit | ||
|
||
export AWS_SHARED_CREDENTIALS_FILE='/tmp/aws-credfile' | ||
export AWS_ENDPOINT_URL="${ENDPOINT:-https://s3.amazonaws.com}" | ||
export AWS_REGION="${DEFAULT_REGION:-us-west-2}" | ||
|
||
if [ -n "$VERIFY_TLS" ] && [[ $VERIFY_TLS == "false" ]]; then | ||
AWS_S3_NO_VERIFY_SSL='--no-verify-ssl' | ||
fi | ||
|
||
is_object_exist() { | ||
local bucket="$1" | ||
local object="$2" | ||
|
||
aws $AWS_S3_NO_VERIFY_SSL s3api head-object --bucket $bucket --key "$object" || NOT_EXIST=true | ||
if [[ -z "$NOT_EXIST" ]]; then | ||
return 1 | ||
fi | ||
} | ||
|
||
s3_add_bucket_dest() { | ||
{ set +x; } 2>/dev/null | ||
aws configure set aws_access_key_id "$ACCESS_KEY_ID" | ||
aws configure set aws_secret_access_key "$SECRET_ACCESS_KEY" | ||
set -x | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.