注意:以下步骤仅适用于将 OpManager 从 12.4 升级到 12.5,以及从 12.5 升级到更高版本(PgSQL 10.21 至 10.x)。
在升级到更高版本(通过 PPM)时,OpManager 服务器会检测当前安装的 PgSQL 版本。12.5 以上的 OpManager 版本仅支持 PostgreSQL 10.21 到 10.x。如果当前 PgSQL 版本不在支持范围内,PPM 安装将会被终止。如果你希望跳过该检查并稍后再执行 PgSQL 迁移,
allow.remote.pgsql.migration = true
OpManager 升级完成后,必须将远程 PgSQL 迁移到其最新版本。请按以下步骤将远程 PostgreSQL 从 9.2.4 迁移到 10.x。
Create database <databasename>
CREATE USER rouser with password '<ROPASSWORD>';

迁移完成后,通过执行以下命令,将旧 PgSQL 数据库中的数据转储到新的数据库:
"<OldPgSQLHome>\bin\pg_dump.exe" -U postgres -p <OldPgSQLPort> -h <OldPgSQLHost> -x -W OpManagerDB | "<NewPgSQLHome>\bin\psql.exe" -U postgres -p <NewPgSQLPort> -h <NewPgSQLHost> -W OpManagerDB
示例:"C:\Program Files\PostgreSQL\9.2.4\bin\pg_dump.exe" -U postgres -p 5431 -h <ip_address_1> -x -W OpManagerDB | "C:\Program Files\PostgreSQL\10.21\bin\psql.exe" -U postgres -p 5432 -h <ip_address_1> -W OpManagerDB
使用新的 PgSQL 信息,将现有 URL 修改为以下格式。
url jdbc:postgresql://<NewPgSQLHost>:<NewPgSQLPort>/<NewlyMigratedDBName>?dontTrackOpenResources=true&useUnicode=true&characterEncoding=utf8
示例:url jdbc:postgresql://remote-pgsql-host:5432/OpManagerDB?dontTrackOpenResources=true&useUnicode=true&characterEncoding=utf8


服务启动后,为了进行基本验证,可在“提交查询”页面中执行一条查询,并尝试在产品中添加设备或执行其他基础功能。[示例查询 - Select * from BuildDetails;]
感谢您的反馈!