How to Use Existing Veeam Backup & Replication PostgreSQL instance for Veeam Backup for Microsoft 365 Deployment
This article documents issues that occur when installing Veeam Backup for Microsoft 365 v8 or higher on the same server as an existing Veeam Backup & Replication v12 or higher deployment that is using the included local PostgreSQL instance.
The errors described may also occur in other scenarios, as they are generic connection errors. This article is strictly relevant to the scenario described.
Challenge
When attempting to install Veeam Backup for Microsoft 365 on a machine where Veeam Backup & Replication is already installed, and that deployment of Veeam Backup & Replication is using the included local PostgreSQL Instance, the Veeam Backup for Microsoft 365 installer fails with the error:
Unable to proceed due to the following error: Unable to connect to the specified server. Error: Failed to connect to: <IP>:<port>.
Other less common but possible errors are:
-
Unable to proceed due to the following error: Unable to connect to the specified server. Error: 28000: no pg_hba.conf entry for host "<IP>", user " postgres", database "postgres", no encryption.
-
Unable to proceed due to the following error: Unable to access PostgreSQL server using SQL authentication. SQL authentication is required by backup proxies. Please enable it on the PostgreSQL server.
Cause
This issue occurs because the Veeam Backup for Microsoft 365 installer has detected the existing local PostgreSQL instance. However, the configuration settings applied to PostgreSQL by Veeam Backup & Replication are incompatible with those required by Veeam Backup for Microsoft 365.
Configuration conflicts:
- Veeam Backup & Replication configures PostgreSQL to listen only for local connections.
Veeam Backup for Microsoft 365 requires that PostgreSQL listen for remote connections from its proxies. - Veeam Backup & Replication does not configure PostgreSQL to allow remote access.
Veeam Backup for Microsoft 365 requires that PostgreSQL allow remote connections so that its Proxies can access the configuration database using a dedicated read-only account using password-based authentication.
Solution
The instructions provided below are specifically for a Windows-based PostgreSQL deployment. This is because the article explains how to configure the PostgreSQL instance deployed by Veeam Backup & Replication (VBR), enabling Veeam Backup for Microsoft 365 to connect to it.
If you are planning to deploy Veeam Backup for Microsoft 365 using a remote dedicated PostgreSQL instance (which may or may not also be used by VBR), that configuration is beyond the scope of this article. For such a setup, you should create a dedicated superuser account and use it during the deployment of Veeam Backup for Microsoft 365. After deployment, consult the Veeam Backup for Microsoft 365 User Guide for details on Adjusting PostgreSQL Instance Configuration.
To enable Veeam Backup for Microsoft 365 and Veeam Backup & Replication to share an existing local PostgreSQL instance, you must modify several PostgreSQL configuration files as described below.
Part 1: Stop Veeam Backup & Replication Tasks and Services
- Ensure all tasks within Veeam Backup & Replication are stopped.
- Stop all Veeam services:
Part 2: Modify PostgreSQL Configuration Files
The default location for all PostgreSQL Configuration Files is:
C:\Program Files\PostgreSQL\15\data\
- Edit postgresql.conf and find the setting 'listen_address' and update the line to be:
- Edit pg_hba.conf and add the following to the bottom of the file:
- Edit pg_ident.conf and ensure that at the bottom of the file there are:
Note: Usernames are entered into this conf file in UPN format.
- An entry for:
veeam "SYSTEM@NT AUTHORITY" postgres
Note: The SYSTEM@NT AUTHORITY account naming is OS-locale dependent. If using an OS with a language other than English, check and use the appropriate value. Mouseover here for PowerShell Script to check.(New-Object System.Security.Principal.SecurityIdentifier("S-1-5-18")).Translate([System.Security.Principal.NTAccount]).Value - An entry for the user account you will use to install Veeam Backup for Microsoft 365.
- Domain Account Example:
veeam user@DOMAIN postgres
- Local Account Example:
veeam user@HOSTNAME postgres
- Domain Account Example:
- An entry for:
- Restart the PostgreSQL Service to apply the changes.
Part 3: Start Veeam Backup & Replication Service and Reattempt Veeam Backup for Microsoft 365 Install
- Start the Veeam services:
- Reattempt the Veeam Backup for Microsoft 365 install.
More Information
Related articles:
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.