diff --git a/migrate.sh b/migrate.sh index 2acd0cc..4075d2d 100644 --- a/migrate.sh +++ b/migrate.sh @@ -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 \ No newline at end of file + +# 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." \ No newline at end of file