Skip to content

Commit

Permalink
Debug backup deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
warrenchristian1telus committed Oct 10, 2024
1 parent f12b7b4 commit 96ed58b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions openshift/scripts/deploy-database-backups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,14 @@ list_backups() {
# Only include entries with size > 1M
if [ "$SIZE_IN_BYTES" -gt $((1 * 1024 * 1024)) ]; then
echo "$SIZE $DATE $FILENAME"
else
echo "Skipped small backup: $FILENAME"
fi
done | sort -k2,3r)

# Select the latest backup
LATEST_BACKUP=$(echo "$FILTERED_SORTED_BACKUPS" | head -n 1)

# Output the size, date, and filename for the selected entry
echo "Selected Backup:"
echo "$LATEST_BACKUP"

# Return the filename of the selected backup
echo "$LATEST_BACKUP" | awk '{print $3}'
}
Expand Down Expand Up @@ -232,5 +230,6 @@ done

if [ $TOTAL_USER_COUNT -eq 0 ]; then
echo "Database is offline or does not contain any users."
sleep 10
restore_database_from_backup
fi

0 comments on commit 96ed58b

Please sign in to comment.