Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

Commit

Permalink
additional output
Browse files Browse the repository at this point in the history
  • Loading branch information
Heavybullets8 committed Aug 21, 2023
1 parent a04d8ff commit 1decb8f
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions functions/backup_restore/database/cnpg_dump.sh
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ backup_cnpg_databases() {
local retention=$1
local timestamp=$2
local dump_folder=$3
local failure=false

mapfile -t app_status_lines < <(db_dump_get_app_status)

Expand Down Expand Up @@ -220,14 +219,12 @@ backup_cnpg_databases() {
for deployment in "${!original_replicas[@]}"; do
if [[ ${original_replicas[$deployment]} -ne 0 ]] && ! scale_deployments "$app_name" 300 0 "$deployment" > /dev/null 2>&1; then
echo_backup+=("Failed to scale down $app_name's $deployment deployment.")
failure=true
fi
done

# Dump the database
if ! dump_database "$app_name" "$dump_folder"; then
echo_backup+=("Failed to back up $app_name's database.")
failure=true
fi

# Scale up all deployments in the app to their original replica counts, or stop the app if it was stopped
Expand All @@ -243,10 +240,6 @@ backup_cnpg_databases() {
fi
done

if [[ $failure = false ]]; then
echo_backup+=("Successfully backed up CNPG databases:")
fi

remove_old_dumps "$dump_folder" "$retention"
echo_backup+=("$(display_app_sizes "$dump_folder")")
}
Expand Down

0 comments on commit 1decb8f

Please sign in to comment.