Views:
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

  1. Dump the database from the original PostgreSQL server.
    1. Copy the IMSS installation package to the original PostgreSQL server and decompress the package.
    2. Set the environmental variable.
      export LD_LIBRARY_PATH=IMSSPackagePath/imss/imssbase/lib
    3. Run the following commands to dump the database:
      IMSSPackagePath/imss/database/pg_dump -U DBUSERNAME -v -Fc IMSSDBNAME > backupfile.tar
      ex: pg_dump -U sa -v -Fc imss > backup_admin.tar
  2. Upgrade the PostgreSQL server to version 9.6, or prepare a new PostgreSQL 9.6 server.
    1. 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.
    2. Manually change the maximum number of database connections to 600.
      vi /var/lib/pgsql/9.6/data/postgresql.conf
      max_connection = 600 (default 100)
    3. Restart PostgreSQL service.
    4. Make sure that IMSS and the external database server use the same time zone and time settings.
  3. Restore the database to the PostgreSQL 9.6 server.
    1. Copy backupfile.tar from the original PostgreSQL server to the destination PostgreSQL server.
    2. Copy IMSS installation package to the new PostgreSQL server and decompress the package.
    3. Change the local authentication method to the password in pg_hba.conf.
      change "local all all peer"
      TO "local all all password"
    4. Restart the PostgreSQL service.
    5. Install the glibc.i686 library.
    6. Set environmental variables.
      export LD_LIBRARY_PATH=IMSSPackagePath/imss/imssbase/lib
    7. Run the following commands to restore the database:
      IMSSPackagePath/imss/database/pg_restore -U DBUSERNAME -d postgres -C -v -e < backupfile.tar
      ex: pg_restore -U sa -d postgres -C -v -e < backup_admin.tar
      Note
      Note
      You may encounter the following error message when you run the pgrestore command:
      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 the pgrestore command again.
  4. Restore the local authentication method in pg_hba.conf.
  5. Restart the PostgreSQL service.