Relocating databases on a remote server

How to relocate the database and upgrade it after its relocation.

General guidelines

If you want to move your local BigFix database, located on the same machine where the BigFix Server is installed, to another remote server, or you need to relocate it from a remote DB2 server to another one, take into account the following guidelines.

Since you need to back up BigFix databases from the current DB2 Server and to restore them on the new DB2 Server, it is strongly suggested to back up/restore using the same DB2 level.

If needed, perform the DB2 upgrade only after restoring the BigFix databases.

Relocating the BigFix databases on a different server is currently supported only using the same instance name (default is db2inst1).

For more details about the DB2 installation requirements and configurations, refer to the following links:

Database requirements

Installing and configuring DB2

Migrating BigFix databases

To migrate BigFix databases, perform the following steps:
  1. Verify that the starting and the destination DB2 are at the same level and the new DB2 system uses the same instance (default: db2inst1).
  2. Stop all BigFix services.
  3. Run the DB2 database backup commands:
    BACKUP DB BFENT COMPRESS
    BACKUP DB BESREPOR COMPRESS
    
  4. Restore the BigFix databases on the new DB2 system:
    RESTORE DB BFENT 
    RESTORE DB BESREPOR 
    
  5. Catalog the new databases on the BigFix Server. From the BigFix Server, run the following DB2 commands:
    UNCATALOG DATABASE BFENT
    UNCATALOG DATABASE BESREPOR
    UNCATALOG NODE TEM_REM
    CATALOG TCPIP NODE TEM_REM REMOTE {host} SERVER {port}  
    CATALOG DATABASE BFENT AS BFENT AT NODE TEM_REM 
    CATALOG DATABASE BESREPOR AS BESREPOR AT NODE TEM_REM
    
    Where:

    {host} is your DB2 remote server hostname and {port} is the DB2 remote server port used.

  6. Update the BigFix Server database settings (as needed) in /var/opt/BESServer/besserver.config.
    [Software\BigFix\EnterpriseClient\Settings\Client\_BESServer_Database_DatabaseAddress]
    value = <new_hostname>
    
    [Software\BigFix\EnterpriseClient\Settings\Client\_BESServer_Database_Port]
    value = "<new_port_number>"
    
  7. If Web Reports is installed, update the following settings (as needed) in /var/opt/BESWebReportsServer/beswebreports.config.
    [Software\BigFix\Enterprise Server\FillAggregateDB]
    DatabaseAddress = <new_hostname>
    Port = <new_port_number>
    
  8. Update the DB2 password on the BigFix Server, (if the password of the db2inst1 user on the new DB2 server is different from the one you have on the old DB2 server ) as described in Changing the database password.
  9. Start the BigFix Server services (except the WebUI) using the commands:
    systemctl start besserver
    systemctl start besfilldb
    systemctl start besgatherdb
    systemctl start beswebreports
    systemctl start bespluginportal (if installed)
    systemctl start besclient

    Up to BigFix Version 11.0.1, for backward compatibility reasons, you can also run the commands:

    /etc/init.d/besserver start
    /etc/init.d/besfilldb start
    /etc/init.d/besgatherdb start
    /etc/init.d/beswebreports start
    /etc/init.d/bespluginportal start (if installed)
    /etc/init.d/besclient start
    
  10. Verify that the components start and the connection with the new configured database works.
  11. If the WebUI is installed, run the BES Support Fixlet ID 2687 from the BES Console to update the "BigFix Server Database Host" with the new Database Configuration specifications (it will also start the WebUI service) .
  12. Update the DNS field in the REPLICATION_SERVERS table with the new DB2 Server hostname.

Upgrading the database after its relocation

If you need to perform the DB2 upgrade, after you did a relocation from local to remote, you can follow these steps:
  1. Remove the local DB2 Server from the BigFix Server machine.
    1. Stop all BigFix services.
    2. From the BigFix Server run the following DB2 commands:
      UNCATALOG DATABASE BFENT
      UNCATALOG DATABASE BESREPOR
      UNCATALOG NODE TEM_REM
      
    3. Proceed uninstalling the DB2 Server. For details, see the following IBM documentation: Uninstalling DB2 database products.
    4. Remove DB2 users and groups.
  2. Install the IBM Data Server at the same version you are going to upgrade the server.
  3. On the new DB2 Server, upgrade the DB2 Server to the target version following the IBM documentation.
    Note: Do not create a new instance during the new DB2 version installation.
  4. After the DB2 Server was upgraded, define the remote node and catalog the remote databases on the BigFix Server:
    CATALOG TCPIP NODE TEM_REM REMOTE {host} SERVER {port}
    CATALOG DATABASE BFENT AS BFENT AT NODE TEM_REM
    CATALOG DATABASE BESREPOR AS BESREPOR AT NODE TEM_REM
    
  5. Test the database connection from the BigFix Server.
  6. Start all BigFix services.