Before you begin
Confirm the following before you begin:- You have access to a PostgreSQL 18 instance (or can upgrade your existing host to PostgreSQL 18)
- You have sufficient disk space for a full database dump
- Your database administrator is available to adapt commands to your specific environment
- You know your PostgreSQL connection details (host, port, username, database name)
The exact commands in this guide vary depending on how your external database is deployed (Docker, bare-metal, VM, or managed service). Work with your database administrator to adapt the procedure to your environment. For a concrete Docker Compose reference, see the Community Edition upgrade guide.
Upgrade process
Stop BloodHound Enterprise
Stop the BloodHound Enterprise application to prevent new writes to the database during the upgrade.
Dump the PostgreSQL 16 database
Use Verify that the dump file was created and has a non-zero size before continuing.
pg_dump to export your existing database to a compressed dump file. Replace the placeholder values with your actual connection details:Back up your data directory
If your PostgreSQL instance uses a data volume or directory, create a backup of it before making changes. The exact method depends on your deployment.
Upgrade PostgreSQL to version 18
Upgrade your PostgreSQL instance to version 18 using the method appropriate for your environment.
PostgreSQL major version upgrades are not backward-compatible. After upgrading to PostgreSQL 18, you cannot start the service against a PostgreSQL 16 data directory without first restoring from your dump file.
Restore the database
After PostgreSQL 18 is running, restore the database from the dump file:Wait for the restore to complete before proceeding.
Verify the upgrade
After the application restarts, confirm that the database is healthy and your data is intact.Confirm the PostgreSQL version
Connect to your PostgreSQL instance and run the following query to confirm PostgreSQL 18 is running:The output should include
PostgreSQL 18.Log in to BloodHound Enterprise
Open your browser and navigate to your BloodHound Enterprise instance. Log in and verify that your data, collectors, and configuration are intact.