#1 Global Leader in Data Resilience

How to Use Existing Veeam Backup & Replication PostgreSQL instance for Veeam Backup for Microsoft 365 Deployment

KB ID: 4638
Product: Veeam Backup for Microsoft 365 | 8
Published: 2024-09-03
Last Modified: 2024-09-10
mailbox
Get weekly article updates
By subscribing, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.

Cheers for trusting us with the spot in your mailbox!

Now you’re less likely to miss what’s been brewing in our knowledge base with this weekly digest

error icon

Oops! Something went wrong.

Please, try again later.

Article Applicability
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, with PostgreSQL already present. The errors described may also occur in other scenarios, as they are generic connection errors. The solution provided is strictly relevant to the scenario described.

Challenge

When attempting to use an existing PostgreSQL Instance that was created by Veeam Backup & Replication, 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>.
When postgres.conf contains listen_addresses = 'localhost'

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

The configuration settings applied to PostgreSQL by Veeam Backup & Replication are incompatible with those required by Veeam Backup for Microsoft 365.

Solution

To enable Veeam Backup for Microsoft 365 and Veeam Backup & Replication to share the existing PostgreSQL instance, you must modify several PostgreSQL configuration files described below.

Part 1: Stop Veeam Backup & Replication Tasks and Services

  1. Ensure all tasks within Veeam Backup & Replication are stopped.
  2. Stop all Veeam services:
Get-Service Veeam* | Stop-Service -Force

Part 2: Modify PostgreSQL Configuration Files

The default location for all PostgreSQL Configuration Files is:
C:\Program Files\PostgreSQL\15\data\

  1. Edit postgresql.conf and find the setting 'listen_address' and update the line to be:
listen_addresses = '*'
  1. Edit pg_hba.conf and add the following to the bottom of the file:
# non-localhost host with user 'postgres' and SSPI
host all postgres 0.0.0.0/0 sspi map=veeam
host all postgres ::/0 sspi map=veeam
# non-localhost host with user 'all' and password
host all all 0.0.0.0/0 scram-sha-256
host all all ::/0 scram-sha-256
  1. Edit pg_ident.conf and ensure that at the bottom of the file there are:
    1. An entry for:
      veeam   "SYSTEM@NT AUTHORITY"   postgres
      
    2. 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
        
  2. Restart the PostgreSQL Service to apply the changes.
Restart-Service -Name "postgresql*"

Part 3: Start Veeam Backup & Replication Service and Reattempt Veeam Backup for Microsoft 365 Install

  1. Start the Veeam services:
Get-Service Veeam* | Start-Service
  1. Reattempt the Veeam Backup for Microsoft 365 install.

More Information

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.

Spelling error in text

This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

Oops! Something went wrong.

Please, try again later.

You have selected too large block!

Please try select less.

KB Feedback/Suggestion

This form is only for KB Feedback/Suggestions, if you need help with the software open a support case

By submitting, you are agreeing to have your personal information managed in accordance with the terms of Veeam's Privacy Notice.
This site is protected by hCaptcha and its Privacy Policy and Terms of Service apply except as noted in our Privacy Policy.
Verify your email to continue your product download
We've sent a verification code to:
  • Incorrect verification code. Please try again.
An email with a verification code was just sent to
Didn't receive the code? Click to resend in sec
Didn't receive the code? Click to resend
Thank you!

Thank you!

Your feedback has been received and will be reviewed.

error icon

Oops! Something went wrong.

Please, try again later.