The ability to run separate PostgreSQL instances for TeamForge database and datamart on the same server has been deprecated in TeamForge 17.11. If you have the TeamForge database and datamart on separate PostgreSQL instances on the same server and if you are upgrading on a new hardware, follow these instructions to create a dump of both the database and datamart and load them into one PostgreSQL instance on the same server.
-
During TeamForge installation, the
REPORTS_DATABASE_PORT
token should no longer be used to assign a separate port for datamart on the server that also runs the TeamForge database. The following warning shows up if you use theREPORTS_DATABASE_PORT
token with a custom port number (other than the default value, which is 5432).Using two separate Postgres clusters for database and datamart on the same machine is deprecated. Consider deploying the two clusters on two machines or using a single cluster for both databases.
-
If you have the TeamForge database and datamart running on separate PostgreSQL instances on the same server:
- New Hardware Upgrade: If you are upgrading on a new hardware, it is highly recommended to create a dump of both the database and datamart and load them into the same PostgreSQL instance.
- Same Hardware Upgrade: If you are upgrading on the same hardware, you may still choose to use the
REPORTS_DATABASE_PORT
and have the database and datamart running on two separate PostgreSQL instances. However, support forREPORTS_DATABASE_PORT
token may end in one of the future TeamForge releases, when you may have to dump and load both the database and datamart on the same PostgreSQL instance anyway.
- Do this on the existing TeamForge Application Server where the database and datamart runs on two separate ports.
- Make a dump file of your site database.
su - postgres /usr/bin/pg_dumpall > /var/lib/pgsql/9.x/backups/teamforge_data_backup.dmp exit mkdir /tmp/backup_dir cp /var/lib/pgsql/9.x/backups/teamforge_data_backup.dmp /tmp/backup_dir/
- Make a dump of your datamart.
/usr/bin/pg_dumpall -p <reports_database_port> > /var/lib/pgsql/9.x/backups/teamforge_reporting_data_backup.dmp
- Make a dump file of your site database.
- Do this on the new TeamForge server.
- Recreate the runtime environment (do not provision TeamForge directly).
teamforge deploy
- Reload the site database.
su - postgres /usr/bin/psql < /tmp/backup_dir/teamforge_data_backup.dmp exit
- Reload the datamart.
su - postgres -c "/usr/bin/psql -p <reports_database_port> < /tmp/backup_dir/teamforge_reporting_data_backup.dmp"
Warning: You must move the PostgreSQL 9.x directory (mv /var/lib/pgsql/9.x /var/lib/pgsql/9.x_old
) after reloading the database dump, failing which theteamforge provision
command will not be successful. - Recreate the runtime environment (do not provision TeamForge directly).
- Provision services.
teamforge provision