This commit is contained in:
CanbiZ
2025-08-21 11:53:07 +02:00
parent 8faecd1f7d
commit 1514caac11
2 changed files with 9 additions and 7 deletions

View File

@@ -163,7 +163,7 @@ function setup_postgresql() {
if [[ "$CURRENT_PG_VERSION" == "$PG_VERSION" ]]; then
: # PostgreSQL is already at the desired version no action needed
else
msg_info "Detected PostgreSQL $CURRENT_PG_VERSION, preparing upgrade to $PG_VERSION"
$STD msg_info "Detected PostgreSQL $CURRENT_PG_VERSION, preparing upgrade to $PG_VERSION"
NEED_PG_INSTALL=true
fi
else
@@ -173,9 +173,9 @@ function setup_postgresql() {
if [[ "$NEED_PG_INSTALL" == true ]]; then
if [[ -n "$CURRENT_PG_VERSION" ]]; then
msg_info "Dumping PostgreSQL $CURRENT_PG_VERSION data"
$STD msg_info "Dumping PostgreSQL $CURRENT_PG_VERSION data"
su - postgres -c "pg_dumpall > /var/lib/postgresql/backup_$(date +%F)_v${CURRENT_PG_VERSION}.sql"
msg_ok "Data dump completed"
$STD msg_ok "Data dump completed"
systemctl stop postgresql
fi