PureMessage for UNIX: migrating the database and quarantine after a locale error

  • Article ID: 113815
  • Rating:
  • 2 customers rated this article 3.0 out of 6
  • Updated: 20 Feb 2013

While upgrading from PureMessage 5.6.1 to 6.x, you have the option of using the PureMessage migration script (pmx-v6-migrate) to import data into the new version of PureMessage.

If your database in version 5.6.1 is using an unexpected locale (anything other than "C"), an error message will be displayed when you attempt the "Database and Quarantine" stage of the migration. A message similar to the following is displayed:

Unable to migrate database data due to locale mismatch (current: en_US.UTF-8, required: C).

You must perform the manual steps described below to transfer the PureMessage database, and then the quarantine, from the old installation to the new installation.

Note: These instructions assume the default installation directories of /opt/pmx (version 5.6.1) and /opt/pmx6 (version 6.x). If your locations differ, adjust the relevant paths shown below as necessary.

Migrating Database Content

  1. As the PureMessage 5 user, stop all PureMessage processes, along with the mail transfer agent that PureMessage uses.

    pmx stop ; pmx-service stop smtp
  2. As the PureMessage 6 user, stop all PureMessage processes, and the mail transfer agent that PureMessage uses.

    pmx stop ; pmx-service stop smtp
  3. As the PureMesssage 5 user, start the database:

    pmx-database start
  4. As the PureMessage 5 user, run the following command to dump and temporarily store the contents of the database.

    /opt/pmx/postgres/bin/pg_dump -E SQL_ASCII -x -c -O pmx_quarantine > <PathToDumpDirectory>
  5. As the PureMessage 5 user, stop the database:

    pmx-database stop
  6. As the PureMessage 6 user, copy the dumped database file to a temporary location within the version 6.x installation directory.

  7. As the PureMessage 6 user, start the database:

    pmx-database start
  8. As the PureMessage 6 user, run the following command to import the dumped data into the PureMessage 6 database:

    /opt/pmx6/postgres/bin/psql pmx_quarantine < <PathToCopiedDumpFile>
  9. As the PureMessage 6 user, finalize the importation of the data by running the following:

    /opt/pmx6/var/migrate/v6/pmx-v6postdb

Migrating Quarantine Content

Once you have successfully imported the contents of the PureMessage 5 database, you are ready to do the same with the PureMessage quarantine.

  1. As the PureMessage 6 user, create a backup of the quarantine directory (/opt/pmx6/var/qdir).

  2. As the root user, copy the contents of /opt/pmx/var/qdir to /opt/pmx6/var/qdir. Be sure to apply your system's "preserve" option.
  3. As the root user, copy the 5.6.1 configuration file that specifies the location of the PureMessage installation (/opt/pmx/etc/location.conf) to the PureMessage 6 installation directory (/opt/pmx6/etc/location.conf).

  4. Change the ownership of both /opt/pmx6/etc/location.conf and /opt/pmx6/var/qdir (copied in steps 2 and 3) to grant permissions to the PureMessage 6 user.
  5. As the PureMessage 6 user, run these two additional commands to finalize the quarantine migration:

    var/migrate/v6/pmx-v6location reset

    var/migrate/v6/pmx-v6resync from_db

  6. As the PureMessage 6 user, start PureMessage and the mail transfer agent that PureMessage uses:

    pmx start ; pmx-service start smtp

 
If you need more information or guidance, then please contact technical support.

Rate this article

Very poor Excellent

Comments