You are here: Manual Installation > Upgrading > Upgrading Moab Accounting Manager

2.19 Upgrading Moab Accounting Manager

This topic provides instructions to upgrade MAM to the latest release version. It includes instructions for migrating your database schema to a new version if necessary.

Moab Accounting Manager uses the standard configure, make, and make install steps for upgrades. This document provides a number of sample steps referenced to a particular installation on a Linux platform using the bash shell. These steps indicate the user ID in brackets performing the step. The exact commands to be performed and the user that issues them will vary based on the platform, shell, installation preferences, and other factors.

2.19.1 Upgrade Moab Accounting Manager

On the MAM Server Host, do the following:

  1. Determine the MAM Accounting admin user and change to that user.
    • If you are upgrading MAM from a version prior to 9.0, use glsuser.
      [root]# glsuser | grep 'Accounting Admin'
      mam      True                                                            Accounting Admin
      [root]# su - mam
    • If you are upgrading MAM at or after 9.0, use mam-list-users.
      [root]# mam-list-users | grep 'Accounting Admin'
      mam      True                                                            Accounting Admin
      [root]# su - mam
  2. Determine whether you need to migrate your database.
    1. Determine your database version.
      • If you are upgrading MAM from a version prior to 9.0, run goldsh System Query.
        [mam]$ goldsh System Query
      • If you are upgrading MAM at or after 9.0, run mam-shell System Query.
        [mam]$ mam-shell System Query
    2. If the current version is lower than 9.0, you must migrate your database. The steps required to do so are incorporated in the remaining steps for this topic.
  3. Stop the server daemon.

    • If you are upgrading MAM from a version prior to 9.0, run goldd -k.
      [mam]$ goldd -k
    • If you are upgrading MAM at or after 9.0, run mam-server -k.
      [mam]$ mam-server -k
  4. If you determined that you must migrate your database, create a database backup.
    • PostgreSQL database.
      [mam]$ pg_dump -U <mam_database_user> -W <old_database_name> > /tmp/<old_database_name>.sql
    • MySQL database.
      [mam]$ mysqldump -u <mam_database_user> -p <old_database_name> > /tmp/<old_database_name>.sql
  5. Verify that each of the prerequisites listed in 2.4 Installing Moab Accounting Manager have been satisfied.
  6. Download the latest MAM build (mam-<version>.tar.gz) from the Adaptive Computing website.

    The variable marked <version> indicates the build's version, revision, and changeset information.

  7. Unpack the tar archive and change directory into the top directory of the distribution.

    [mam]$ tar -zxvf mam-<version>.tar.gz
    [mam]$ cd mam-<version>
  8. Configure Moab Accounting Manager by running the configure script with the desired options.

    It is recommended that you use the same configure options that were used in the previous installation. You can examine the config.log file where you unpacked your previous distribution to help determine the configuration options that were used to install the prior version of MAM.

    Client and server command names changed beginning with 9.0. If you want to create symbolic links to enable you to continue to use the old client and server command names, use the --with-legacy-links option with configure. When running a command under its old name, the command will issue a deprecation warning. This warning can be disabled by setting client.deprecationwarning = false in the mam-client.conf file.

    [mam]$ ./configure
  9. To compile the program, type make.

    [mam]$ make

    If you only need to install the clients on a particular system, replace make with make clients-only. If you only need to install the web GUI on a particular system, replace make with make gui-only.

  10. Run make install as root to install Moab Accounting Manager.

    [mam]$ su -c "make install"

    If you only need to install the clients on a particular system, replace "make install" with "make install-clients-only". If you only need to install the web GUI on a particular system, replace "make install" with "make install-gui-only".

  11. Edit the configuration files as necessary. You may want to compare your existing configuration files with those distributed with the new release to determine if you want to merge and change any of the new options within your configuration files.

    • If you are upgrading MAM from a version prior to 9.0, the install process will have saved your prior configuration files to {goldd,gold,goldg}.conf.pre-9.0 and written new default server configuration file as mam‑{server,client,gui}.conf. You will need to merge any non-default parameters from your prior config files to the new default config files.
      [mam]$ diff /opt/mam/etc/goldd.conf.pre-9.0 /opt/mam/etc/mam-server.conf
      [mam]$ vi /opt/mam/etc/mam-server.conf
      [mam]$ diff /opt/mam/etc/gold.conf.pre-9.0 /opt/mam/etc/mam-client.conf
      [mam]$ vi /opt/mam/etc/mam-client.conf
      [mam]$ diff /opt/mam/etc/goldg.conf.pre-9.0 /opt/mam/etc/mam-gui.conf
      [mam]$ vi /opt/mam/etc/mam-gui.conf
    • If you are upgrading MAM at or after 9.0, merge and change any of the new options supplied in the new default configuration files (saved in mam‑{server,client,gui}.conf.dist) into your existing configuration files (mam‑{server,client,gui}.conf).

      [mam]$ diff /opt/mam/etc/mam-server.conf /opt/mam/etc/mam-server.conf.dist
      [mam]$ vi /opt/mam/etc/mam-server.conf
      [mam]$ diff /opt/mam/etc/mam-client.conf /opt/mam/etc/mam-client.conf.dist
      [mam]$ vi /opt/mam/etc/mam-client.conf
      [mam]$ diff /opt/mam/etc/mam-gui.conf /opt/mam/etc/mam-gui.conf.dist
      [mam]$ vi /opt/mam/etc/mam-gui.conf

    Verify that your current path points to your newly installed clients and server.

    [mam]$ which mam-server
    /opt/mam/sbin/mam-server
  12. Start the server daemon back up.

    [mam]$ mam-server
  13. If you are migrating your database to 9.0, you will do so by running one or more migration scripts. You must run every incremental migration script between the version you are currently using and the new version (9.0). These scripts are designed to be rerunnable, so if you encounter a failure, resolve the failure and rerun the migration script. If you are unable to resolve the failure and complete the migration, contact Support.

    For example, if you are migrating from Moab Accounting Manager version 7.2, you must run five migration scripts: the first to migrate the database schema from 7.2 to 7.3, the second to migrate from 7.3 to 7.5, the third to migrate the database schema from 7.5 to 8.0, the fourth to migrate the database schema from 8.0 to 8.1, and the fifth to migrate the database schema from 8.1 to 9.0.

    [mam]$ sbin/migrate_7.2-7.3.pl
    [mam]$ sbin/migrate_7.3-7.5.pl
    [mam]$ sbin/migrate_7.5-8.0.pl
    [mam]$ sbin/migrate_8.0-8.1.pl
    [mam]$ sbin/migrate_8.1-9.0.pl
  14. Verify that the resulting database schema version is 9.0.

    [mam]$ mam-shell System Query
    
    Name                    Version Description
    ----------------------- ------- ------------------
    Moab Accounting Manager 9.0     Commercial Release
  15. Verify that the executables have been upgraded to 9.0.2.

    [mam]$ mam-server -v
    
    Moab Accounting Manager version 9.0.2

© 2016 Adaptive Computing