Move the datamart (other modes)

In this task, we move the PostgreSQL datamart from its own instance to a separate box in all other modes, except dedicated database server mode.

  1. Stop TeamForge on the app box. If this is a multi-box scenario, stop TeamForge on all other boxes as well.
    • [RUNTIME_DIR]/scripts/collabnet stop
  2. Do a dump of the PostgreSQL datamart. [RUNTIME_DIR]/scripts/db.py -a dump -t reporting -f <dump-location>
  3. Create a new datamart instance using datamart-pgsql-setup.sh or follow the instructions below in the database box.
    • su - postgres
    • initdb -D /var/lib/pgsql/9.0/reports
  4. Set the REPORTS_DATABASE_PORT in site-options.conf
    Note: This value should be different from the value of DATABASE_PORT. The recommended value is 5632.
  5. Re-create the [RUNTIME_DIR]
    • install.sh -r -d /opt/collabnet/teamforge
  6. Restore the datamart into the new instance.
    • [RUNTIME_DIR]/scripts/db.py -a restore -t reporting -f <dump-location>
  7. Start the services in all boxes.
    • [RUNTIME_DIR]/scripts/collabnet start all
  8. Check if the existing data appears in charts.
  9. Permanently remove the old datamart from the TeamForge instance.
    • su - postgres -c 'dropdb <datamart-name> -p <database-port>'