Updating postgres

The IBM® MFA database includes details about the system configuration, details about all registered users, their configured policies, and authentication methods. You must back up the IBM MFA database before updating postgres.

Before you begin

As a general best practice, you should back up the IBM MFA database at the following times:
  • After configuring users, policies, or authentication methods.
  • Before performing maintenance activity on the system.
  • Periodically, following your local policies and procedures.

About this task

To update postgres, complete the following steps:

Procedure

  1. Stop the IBM MFA server:
    systemctl stop mfa
  2. Enter the following command as root to back up the database. The resulting /opt/IBM/MFA/mfadb.sql file contains all of the commands that are needed to re-create the database until that time.
    /usr/bin/pg_dump -f /opt/IBM/MFA/mfadb.sql -d mfadb
  3. Enter the following command as root to delete the existing database:
    dropdb mfadb
  4. Upgrade postgres. Enter the following commands depending on the platform on which you are installing, or use your method of choice to update the packages.
    For RHEL:
    yum update postgresql-server
    
    For SLES:
    zypper update libpq5
    zypper update postgresql10-server
  5. Become the postgres user and enter the following command to create the database:
    su - postgres
    createdb -O root mfadb
  6. Exit the postgres user account:
    exit
  7. Enter the following command as root to restore the database:
    /usr/bin/psql -U root -d mfadb -f /opt/IBM/MFA/mfadb.sql
  8. Start the IBM MFA server:
    systemctl start mfa