Skip to content

Commit

Permalink
Back up buckets with production suffix too.
Browse files Browse the repository at this point in the history
  • Loading branch information
sKoreman committed Nov 12, 2024
1 parent ea5b3dc commit f0ec86f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/backup-cloud-storage/backup-cloud-storage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ BUCKETS=`gsutil ls`
for bucket in $BUCKETS; do
BUCKETNAME=$(echo "${bucket}" | sed 's/gs:\/\/*//g' | sed 's/.$//')
FILENAME="${BUCKETNAME}_${DATE}"
if [[ $bucket =~ "-prd/" ]]; then
if [[ $bucket =~ "-prd/" || $bucket =~ "-production/" ]]; then
if [[ "$(gsutil du -s ${bucket})" == 0* ]]; then
echo "Skipping empty bucket '${BUCKETNAME}'"
else
Expand Down

0 comments on commit f0ec86f

Please sign in to comment.