Pulse-IT: PostgreSQL Major Version Upgrade Guide
This guide walks through the steps to upgrade PostgreSQL from version 12 to version 16 for a Pulse-IT installations.
- Pulse-IT: PostgreSQL Major Version Upgrade Guide
- Requirements
- 1. Upgrade the PostgreSQL 12 provided with Pulse-IT
- 1.3 Rollback
- 2. Upgrading external PostgresSQL 12
Requirements
Upgrading to PostgreSQL 16 requires Pulse-IT 4.0-2224 or higher.
1. Upgrade the PostgreSQL 12 provided with Pulse-IT
1.1. From Centos/RedHat Pulse-IT 3.1
Step 1: Create a Backup of the current database
Create a backup directory:
mkdir -p ~/backup
Backup the current PostgreSQL 12 database Create a complete dump of the current PostgreSQL database, replacing ait with the correct PostgreSQL username if necessary.
pg_dump -U ait ait_factory | gzip > ~/backup/upgrade_backup_12.sql.gz
Step 2: Transfer the backup file to the new Pulse-IT 4.0 host
Step 3: Upgrade Postgres and Pulse-IT using upgrade script
- Enter inside the new Pulse-IT 4.0 installation folder
- Run postgres upgrade script and specify the backup file location
./upgrade-postgres.sh --backup-path <path/to/backup>
Step 4: Import new 4.0 license
Import a new license for Pulse-IT 4.0 since the license from the 3.1 installation is no longer valid.
1.2. From Docker Pulse-IT 3.1/4.0 with PostgreSQL 12 to Pulse-IT 4.0 with PostgreSQL 16
Step 1: Copy new Pulse-IT 4.0 installer
Step 2: Upgrade Postgres and Pulse-IT using upgrade script
- Enter inside the new Pulse-IT 4.0 installation folder
- Run postgres upgrade script
chmod +x upgrade-postgres.sh
./upgrade-postgres.sh
Step 3: (only from version 3.1) Import new 4.0 license
Import a new license for Pulse-IT 4.0 since the license from the 3.1 installation is no longer valid.
1.3 Rollback
In case of upgrade problems, you can rollback to the previous version.
From Docker Pulse-IT 3.1/4.0 with PostgreSQL 12
Step 1: Stop PostgresSQL 16
- Enter inside the Pulse-IT 4.0 with PostgreSQL 16 installation folder
- Stop PostgresSQL 16 container
./embrace-app.sh --down
- delete the PostgresSQL 16 volume docker volume rm embrace-postgres-16-volume
Step 2: Start old Pulse-IT version
- Enter inside the old Pulse-IT version installation folder
- Start Pulse-IT
./embrace-app.sh
2. Upgrading external PostgresSQL 12
2.1 From Centos/RedHat or Docker Pulse-IT with AWS RDS PostgreSQL 12
Step 1: Create a Backup of the current database
Before upgrading the database, create a complete backup of the current database to prevent any data loss during the upgrade process.
Step 2: Upgrade PostgreSQL RDS to PostgreSQL 16:
Follow the official AWS guide to upgrade PostgreSQL:
> Upgrading the PostgreSQL DB engine for Amazon RDS
Step 3: Restart Pulse-IT
Restart Pulse-IT to apply the database migration changes from the previous version.
./embrace-app.sh --restart
2.2 From Centos/RedHat or Docker Pulse-IT any external PostgreSQL 12
Step 1: Create a Backup of the current database
Before upgrading the database, create a complete backup of the current database to prevent any data loss during the upgrade process.
Step 2: Upgrade external PostgreSQL to version 16.
According to the official PostgreSQL documentation, the traditional method for moving data to a new major version is to dump and restore the database, though this can be slow. A faster method is pg_upgrade.
Step 3: Restart Pulse-IT
Restart Pulse-IT to apply the database migration changes from the previous version.
./embrace-app.sh --restart