If IMSS 7.1 is installed with the external
admin database, upgrade the PostgreSQL server first before IMSS upgrade. In addition, provide the new
PostgreSQL information in Upgrading an IMSS Single Server Deployment.
To upgrade the PostgreSQL server, perform the following steps:
Procedure
- Dump the database from the original PostgreSQL server.
- Copy the IMSS installation package to the original PostgreSQL server and decompress the package.
- Set the environmental variable.
export LD_LIBRARY_PATH=IMSSPackagePath/imss/imssbase/lib - Run the following commands to dump the database:
IMSSPackagePath/imss/database/pg_dump -U DBUSERNAME -v -Fc IMSSDBNAME > backupfile.tarex: pg_dump -U sa -v -Fc imss > backup_admin.tar
- Upgrade the PostgreSQL server to version 9.6, or prepare a new PostgreSQL 9.6
server.
- Create a database account same as the IMSS 7.1 admin database account
(that is,
DBUSERNAME
mentioned in Step 1). Make sure it has the superuser role. - Manually change the maximum number of database connections to
600.
vi /var/lib/pgsql/9.6/data/postgresql.confmax_connection = 600 (default 100) - Restart PostgreSQL service.
- Make sure that IMSS and the external database server use the same time zone and time settings.
- Create a database account same as the IMSS 7.1 admin database account
(that is,
- Restore the database to the PostgreSQL 9.6 server.
- Copy
backupfile.tarfrom the original PostgreSQL server to the destination PostgreSQL server. - Copy IMSS installation package to the new PostgreSQL server and decompress the package.
- Change the local authentication method to the password in
pg_hba.conf.change "local all all peer"TO "local all all password" - Restart the PostgreSQL service.
- Install the glibc.i686 library.
- Set environmental variables.
export LD_LIBRARY_PATH=IMSSPackagePath/imss/imssbase/lib - Run the following commands to restore the database:
IMSSPackagePath/imss/database/pg_restore -U DBUSERNAME -d postgres -C -v -e < backupfile.tarex: pg_restore -U sa -d postgres -C -v -e < backup_admin.tar
Note
You may encounter the following error message when you run thepgrestorecommand:pg_restore: connecting to database for restorePassword: pg_restore: creating DATABASE xxxx pg_restore: connecting to new database "xxxx" pg_restore: connecting to database "xxxx" as user "xx" pg_restore: creating SCHEMA public pg_restore: creating COMMENT SCHEMA public pg_restore: creating PROCEDURAL LANGUAGE plpgsql pg_restore: [archiver (db)] Error while PROCESSING TOC: pg_restore: [archiver (db)] Error from TOC entry 10536; 2612 94235 PROCEDURAL LANGUAGE plpgsql imss pg_restore: [archiver (db)] could not execute query: ERROR: role "XXXX" does not exist Command was: ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO imss;
If this occurs, add the database role as required in the error message. The database will still be restored despite of this error. After creating the role in the database, delete the database that has been restored and run thepgrestorecommand again.
- Copy
- Restore the local authentication method in
pg_hba.conf. - Restart the PostgreSQL service.
