Instructions for GoCD 20.5.0+ upgrade if using addons
GoCD 20.5.0 has introduced support for multiple databases. Hence, from GoCD 20.5.0 onwards a separate PostgreSQL addon is no longer required to connect to a PostgresSQL database. However to continue to use PostgresSQL your existing database needs a one-time manual migration to make it compatible with GoCD 20.5.0 and beyond.
Please refer to Upgrading to GoCD 20.5.0 document for detailed instructions to upgrade your GoCD server.
If you are using the Business-Continuity Addon follow the below steps to upgrade to GoCD 20.5.0+
Step 1: Shutdown down the Secondary GoCD server.
Step 2. Upgrade Primary Server
Follow Upgrading to GoCD 20.5.0 document for detailed instructions to upgrade your Primary GoCD server.
Note: Do not start your Primary server post the upgrade. The Primary server can be started post the Secondary server upgrade as outlined below.
Step 3: Sync Secondary database with Primary database
After the migration of the primary database in Step 2, the secondary database now needs to be synced with the migrated primary database.
Step 3.1: Take database dump of Primary database
pg_dump --no-owner -h YOUR_PRIMARY_DB_HOST -p YOUR_PRIMARY_DB_PORT -U YOUR_PRIMARY_DB_USER --format=custom --dbname=YOUR_PRIMARY_DB_NAME gocd_dump.sqlc
Step 3.2: Restore Secondary database
pg_restore --host=YOUR_SECONDARY_DB_HOST --port=YOUR_SECONDARY_DB_PORT --username=YOUR_SECONDARY_DB_USER --format=custom --exit-on-error --single-transaction --dbname=YOUR_SECONDARY_DB_NAME gocd_dump.sqlc
Step 4: Configure Secondary server
In Step 2 the Primary server would be configured with a
db.properties file to connect to the PostgreSQL database.
Similarly add a
db.properties in the Secondary server configuration directory which should have details to connect to the Secondary
Step 5: Secondary server cleanup
Remove the PostgreSQL addon jar from the addons directory (typically /var/lib/go-server/addons on Linux)
Remove the postgresqldb.properties file from the configuration directory (typically /etc/go on Linux).
Step 6: Upgrade Secondary server
Upgrade your Secondary GoCD server to 20.5.0+.
Step 6.1: Install latest addon
Replace the Business Continuity Addon on both Primary and Secondary server with the latest addon jar.
The latest available version of the addon is
Step 6.2: Start GoCD Server
Start the Secondary GoCD server and navigate to
https://<secondary-server>:<port>/go/add-on/business-continuity/admin/dashboard and see the status of the Business Continuity.