Quantcast
Channel: Veeam Support Knowledge Base
Viewing all articles
Browse latest Browse all 4362

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

$
0
0

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-03
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.

The script provided below assumes the configuration files are in their default location: C:\Program Files\PostgreSQL\15\data\

 

  1. Ensure all tasks within Veeam Backup & Replication are stopped.
  2. Stop all Veeam services:
Get-Service Veeam* | Stop-Service -Force
  1. Open an Administrative PowerShell Console (Win+X, tap A)
  2. Run the the following PowerShell script to update the configuration files and restart the PostgreSQL service:
#Modify postgresql.conf to change listen_addresses from 'localhost' to '*' to allow remote connections.
(Get-Content -Path "C:\Program Files\PostgreSQL\15\data\postgresql.conf") -replace "listen_addresses = 'localhost'", "listen_addresses = '*'" | Set-Content -Path "C:\Program Files\PostgreSQL\15\data\postgresql.conf"

# Modify pg_hba.conf to enforce SSPI authentication for 'postgres' user and allow password-based connections (SCRAM-SHA-256) for all other users.
Add-Content -Path "C:\Program Files\PostgreSQL\15\data\pg_hba.conf" "`n# 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"


# Ensure pg_ident.conf allows SSPI (Windows-based) authentication for the Local System account and the current user, mapped to the postgres account.
If (!(Select-string -Path "C:\Program Files\PostgreSQL\15\data\pg_ident.conf" -Pattern "veeam"))
{
Add-Content -Path "C:\Program Files\PostgreSQL\15\data\pg_ident.conf" "veeam `"SYSTEM@NT AUTHORITY`" postgres
veeam `"$env:UserName@$env:Computername`" postgres"
}

#Restart the PostgreSQL Service
Restart-Service -Name "postgresql*"
  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.

Viewing all articles
Browse latest Browse all 4362

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>