Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion percona-xtradb-cluster-5.7-backup/lib/pxc/aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ is_object_exist() {
local path="$2"

# '--summarize' is included to retrieve the 'Total Objects:' count for checking object/folder existence
res=$(aws $AWS_S3_NO_VERIFY_SSL s3 ls "s3://$bucket/$path" --summarize --recursive)
res=$(aws $AWS_S3_NO_VERIFY_SSL s3 ls "s3://$bucket/$path" --summarize --recursive 2>&1)
if echo "$res" | grep -q '(NoSuchKey)'; then
return 0
fi
if echo "$res" | grep -q 'Total Objects: 0'; then
return 0 # object/folder does not exist
fi
Expand Down
5 changes: 4 additions & 1 deletion percona-xtradb-cluster-8.0-backup/lib/pxc/aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ is_object_exist() {
local path="$2"

# '--summarize' is included to retrieve the 'Total Objects:' count for checking object/folder existence
res=$(aws $AWS_S3_NO_VERIFY_SSL s3 ls "s3://$bucket/$path" --summarize --recursive)
res=$(aws $AWS_S3_NO_VERIFY_SSL s3 ls "s3://$bucket/$path" --summarize --recursive 2>&1)
if echo "$res" | grep -q '(NoSuchKey)'; then
return 1
fi
if echo "$res" | grep -q 'Total Objects: 0'; then
return 1 # object/folder does not exist
fi
Expand Down
5 changes: 4 additions & 1 deletion percona-xtradb-cluster-8.4-backup/lib/pxc/aws.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ is_object_exist() {
local path="$2"

# '--summarize' is included to retrieve the 'Total Objects:' count for checking object/folder existence
res=$(aws $AWS_S3_NO_VERIFY_SSL s3 ls "s3://$bucket/$path" --summarize --recursive)
res=$(aws $AWS_S3_NO_VERIFY_SSL s3 ls "s3://$bucket/$path" --summarize --recursive 2>&1)
if echo "$res" | grep -q '(NoSuchKey)'; then
return 1
fi
if echo "$res" | grep -q 'Total Objects: 0'; then
return 1 # object/folder does not exist
fi
Expand Down