Replace database with new database version

This commit is contained in:
Pierre HUBERT 2024-12-06 12:07:51 +01:00
parent a69ac9bc50
commit 00ca91a06a

View File

@ -28,4 +28,11 @@ mkdir "$NEW_DB_PATH"
cd /tmp
/postgres/17/bin/pg_upgrade -b /postgres/16/bin/ -d "$OLD_DB_PATH" -D "$NEW_DB_PATH" -U "$POSTGRES_USER" || exit 2
# TODO: replace database
# Replace database
echo "Replace database files..."
rm -rf "$DB_PATH"/*
cp -r "$NEW_DB_PATH"/* "$DB_PATH"
mv "$OLD_DB_PATH" "$DB_PATH"
echo "Done with migration."