Migrate Data Between PostgreSQL Implementations

If you want to migrate Tenable Security Center Director data between PostgreSQL implementations, Tenable offers a script to simplify the process.

The script is supported for the following use cases:

  • Existing Tenable Security Center Director installs that are licensed and configured. For new installs, follow the directions in Connect an External PostgreSQL Server.

  • Migrating from an internal to an external PostgreSQL.

  • Migrating from an external PostgreSQL version 16 to an external PostgreSQL version 16.

Note: In the following instructions, the source server is the PostgreSQL that you are migrating data from, and the destination server is the PostgreSQL that you are migrating data to.

Before you begin

  • The destination PostgreSQL must be a supported version. For information about supported PostgreSQL versions, see External PostgreSQL Requirements.

  • For Tenable Security Center Director 6.5.x and 6.6.x, download the script php file from the Tenable downloads site to the server where you have installed Tenable Security Center Director. Move the script file to /opt/sc/src/tools.

  • Ensure that both the source PostgreSQL server and the destination PostgreSQL server are currently running.

  • On the destination PostgreSQL server, you must have the permission to create a database. If the database is already created, then you must have read and write permissions.

Migrate data from a PostgreSQL version 16 implementation

  1. Stop Tenable Security Center Director with the following command:

    Copy
    # /bin/systemctl stop SecurityCenter
  2. Set the environment variables for the destination PostgreSQL server.

    Note: You must set the environment variables with a root or tns user account. Use the same account to run the script in step 4. If you are using the tns user account to run the script, switch to the tns user using the command su - tns.

  3. Run the following script on the server where you have installed Tenable Security Center Director:

    Copy
    /opt/sc/support/bin/php /opt/sc/src/tools/MovePostgresDB.php

    The data on the source server is copied to the destination server.

  4. Start Tenable Security Center Director with the following command:

    Copy
    # /bin/systemctl start SecurityCenter