PostgreSQL is a relational database management system (RDBMS) for storing and managing data. The default installations of Veeam Backup & Replication from v12 uses PostgreSQL. This is due to various reasons as described in the following articles: how to Migrate Veeam Configuration Database to PostgreSQL Server.
Note: At the time of writing this guide, Veeam still recommended to use Microsoft SQL Server when you backup more than 5000 VMs.
There are numerous reasons for upgrading the PostgreSQL Engine used by VBR? I will therefore refer you to the following release note.
Determine the PostgreSQL version and Backup
Before proceeding, verify Veeam’s official support for the target PostgreSQL version (system requirements for the compatibility list). At the time of writing this article, Veeam currently supports “local or remote” installation of the following versions of PostgreSQL instance for the Configuration Database.
- PostgreSQL 14.x
- PostgreSQL 15.x (PostgreSQL 15.13 is included in the Veeam Backup & Replication 12.3 setup).
To determine my current PostgreSQL version, please launch pgAdmin as shown below

For best practive, I will recommend that you create a backup of the postgresql database backup. To do this, right-click on the Veeam database and select “Backup”.

the backup will start and should end very shortly.

Essential Steps to Take Before Upgrading PostgreSQL
Stop all backup jobs as shown below.

Create a configuration backup. To do this, click on the Hamburger menu and select configuration backup.

Click on backup now. As you can see, the backup is being processed.

Proceed and stop all Veeam related services

Alternatively, you could use the following command below to stop all veeam related services.
Get-Service Veeam* | Stop-Service -Force

How to upgrade PostgreSQL Engine
All PostgreSQL update releases include all fixes and improvements from earlier updates within the same major version. Each new update builds on the previous ones, so when you upgrade from version 15.6 to 15.13 as it is in my case. You automatically get everything introduced in 15.6 and 15.13 as well.
Please, proceed and download the latest version of PostgreSQL. As you can see below, upon clicking on the supported platform to download, the download will start.

Method 1: Upgrading within the same major version (e.g., 15.6 → 15.13)
Installing packages with a new version of PostgreSQL. It is suitable only for minor updates. Before performing the update, study the release notes. This involves updating the existing binaries (replacing the executables) with those from the new version, assuming no changes to the data directory format as we will see very shortly.
Note: Here, no dump, restore, or
pg_upgrade
is required. This method is also fast and safe.
Since, this is a minor update, and you can safely stop the postgreSQL service as shown below.

Next, install the new version (same major version). This will replace the binaries, and do not forget to restart the service. Please, see how to “Install PostgreSQL on Windows server as Veeam Database Engine“.
During installation, please keep the same directory data for postgresql. When the installation completes, reboot your Veeam Server and re-enable Veeam jobs.


An existing PostgreSQL installation has been found. Please click next to upgrade it

Select Next on the “Existing data directory”

Click the Next button on the Pre-installation Summary window



Installation progress

Uncheck the stack builder as you wish

The PostgreSQL service is usually started automatically. I will recommend that you verify this, as shown below by launching the services manager

Launch pgAdmin to determine the version upgrade.

Next, start all Veeam services as shown below
Get-Service -Name 'Veeam*' | Where-Object {$_.Status -ne 'Running'} | Start-Service

All the services are running


Method 2: Via the standard pg_dumpall program
This method has been discuss by
This is a more reliable method, but it may sometimes require a longer downtime. Kindly communicate the downtime with your stakeholders. I will demonstrate this step when Veeam decides to support a different version of PostgreSQL, say version 16.
Back up your database using pg_dumpall
as shown below.
pg_dumpall -U postgres -f alldb_backup.sql
All we need to do is ensure that the service is stopped as shown below.

Install the new PostgreSQL version (e.g., 15.13) using the EnterpriseDB installer as discussed below

Restore your data
psql -U postgres -f alldb_backup.sql
When complete, ensure all services are running and re-enable your jobs. Interested in taking a look at the original blog post, here is the link.
Method 3: Via the Standard pg_upgrade program
If you hate the KISS principle and like to over complicate thing, then you can use this method
When you upgrade PostgreSQL to a new major version, you can also use the
pg_upgrade
tool to update your existing data files. This method avoids the need for a full data dump and reload, which can be time-consuming, especially with large datasets. PostgreSQL provides a Windows-compatible version ofpg_upgrade
. Please, take a look at this GitHub page for more information. Also, see this link for more information.