This article is intended only for deployments where the PostgreSQL Instance used by Veeam Backup for Microsoft 365 is hosted on its own dedicated server.
For deployments of Veeam Backup for Microsoft 365 where the PostgreSQL instance is installed on the same machine as Veeam Backup for Microsoft 365, PgBouncer must not be deployed.
Review KB4758: PostgreSQL and PgBouncer Sizing and Configuration Guide for advice on whether the PostgreSQL instance should be deployed on its own dedicated server based on the Veeam Backup for Microsoft 365 deployment size. If the guidance in that article indicates that PostgreSQL should be hosted on a dedicated server, consider migration (review: KB4676: How to Migrate the Configuration and Repository Cache Databases).
Each proxy and repository must connect to the PostgreSQL database when using Veeam Backup for Microsoft 365. This can quickly create thousands of separate database connections in larger environments, overloading the PostgreSQL server’s resources and network, causing performance issues.
PgBouncer helps by pooling those connections. Instead of every proxy making its own connection, PgBouncer groups them and reuses connections efficiently. This dramatically reduces the total number of database connections and lowers the strain on the PostgreSQL server, making the system more stable and reliable.
Depending on the number of proxies or repositories, you may require more precise configuration tunings for PostgreSQL and PgBouncer parameters.
KB4758: PostgreSQL and PgBouncer Sizing and Configuration Guide
Using pgAdmin, or the PostgreSQL DB management tool of your choosing, create a dedicated user within the PostgreSQL instance for PgBouncer to use.
pg_hba.confFound in: C:\Program Files\PostgreSQL\15\data\ file and verify that it contains rules to accept local connections.# TYPE DATABASE USER ADDRESS METHOD local all all scram-sha-256 host all all 127.0.0.1/32 scram-sha-256 host all all ::1/128 scram-sha-256
pg_hba.conf file, then restart the PostgreSQL service.Since PgBouncer must be installed on the same machine as the existing PostgreSQL instance, the instructions depend on the OS of the machine where PostgreSQL is installed.
Expand the appropriate section.
In the Veeam Backup for Microsoft 365 settings, change the port used to connect to PostgreSQL to the one used by PgBouncer.
C:\ProgramData\Veeam\Backup365\
Config.xml and Proxy.xml in case changes need to be reverted or a misconfiguration occurs.Config.xml file, and within the <Archiver> section, change the port= value to 6432 for the following sections:
<ControllerPostgres ControllerConnectionString="host=VB365;port=5432
<RemoteProxyDeploymentSettings ControllerConnectionStringForProxy="host=VB365;port=5432
PersistentCacheConnectionStringTemplate="host=VB365;port=5432This entry is on the same line as "<RemoteProxyDeploymentSettings"
Proxy.xml file, and within the <Archiver> section, change the port= value to 6432 for the following sections:
<ProxyPostgres ControllerConnectionString="host=testvm;port=5432
<PersistentCachePostgres PersistentCacheConnectionString="host=testvm;port=5432
Config.xml and Proxy.xml files.Config.xml and Proxy.xml files and confirm that all port values you set to 6432 are still set that way.If this KB article did not resolve your issue or you need further assistance with Veeam software, please create a Veeam Support Case.
To submit feedback regarding this article, please click this link: Send Article Feedback
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.
This form is only for KB Feedback/Suggestions, if you need help with the software open a support case