- Veeam Support Knowledge Base
- How to Manually Back Up Veeam Configuration Databases
How to Manually Back Up Veeam Configuration Databases
| KB ID: | 1471 |
| Product: |
Veeam Backup & Replication | 12 | 12.1 | 12.2 | 12.3 | 12.3.1 | 12.3.2 | 13 | 13.1 Veeam Service Provider Console | 7.0 | 8.0 | 8.1 | 9 | 9.1 | 9.2 | 9.3 Veeam Cloud Connect | 12 | 12.2 | 12.3 | 12.3.2 | 13 |
| Published: | 2012-01-06 |
| Last Modified: | 2025-12-30 |
| Languages: | JP |
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
Oops! Something went wrong.
Please, try again later.
Purpose
This article documents methods to back up Microsoft SQL and PostgreSQL databases.
This article also documents how to locate the configuration database for
- Veeam Backup & Replication / Veeam Cloud Connect
- Enterprise Manager
- Veeam Service Provider Console.
For information about Veeam ONE, please see: KB2356
Identify Veeam Database Location
Veeam Software Appliance 13 (Veeam Backup & Replication on Linux)
For deployments of Veeam Backup & Replication 13 on Windows, please review the VBR/VCC v12+ on Windows section.
To back up the configuration database used by Veeam Software Appliance, connect to the Host Management Console and use the Create support logs bundle feature with the Include configuration database check box selected.
The full procedure is documented here:
Veeam Backup & Replication or Veeam Cloud Connect version 12 or higher on Windows
For versions of Veeam Backup & Replication or Veeam Cloud Connect older than version 12, please click here to be taken to the legacy section of this article.
Method 1: Identify Using the Configuration Database Connection Settings Utility
- Launch the Configuration Database Connection Settings utility.
- Select Veeam Backup & Replication, and click Next to see the product's database connection settings.
- On the Connection Settings tab, take note of the Database engine and Connection settings.
- Click Cancel to close the Configuration Database Connection Settings utility, making no changes.
Failure to click Cancel will restart all Veeam services and forcefully stop all active jobs.
Method 2: Identify Using PowerShell
Run the following PowerShell script on the server where either Veeam Backup & Replication or Veeam Cloud Connect is installed, and it will output the database connection information.
The script below simply pulls information from specific registry values and displays those values in the PowerShell console. No changes will be made to the system.
$activeConfig = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication\DatabaseConfigurations' -Name 'SqlActiveConfiguration').SqlActiveConfiguration
if ($activeConfig -eq "MsSql") {
$sqlServerName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication\DatabaseConfigurations\MsSql' -Name 'SqlServerName').SqlServerName
$sqlInstanceName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication\DatabaseConfigurations\MsSql' -Name 'SqlInstanceName').SqlInstanceName
$sqlDatabaseName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication\DatabaseConfigurations\MsSql' -Name 'SqlDatabaseName').SqlDatabaseName
Write-Host "Database Engine: $($activeConfig) "
Write-Output "Connection Settings: $($sqlServerName)\$($sqlInstanceName)"
Write-Output "Database Name: $($sqlDatabaseName)"
} elseif ($activeConfig -eq "PostgreSql") {
$pgServerName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication\DatabaseConfigurations\PostgreSql' -Name 'SqlHostName').SqlHostName
$pgPortNumber = (Get-ItemPropertyValue -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication\DatabaseConfigurations\PostgreSql' -Name 'SqlHostPort')
$pgDatabaseName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication\DatabaseConfigurations\PostgreSql' -Name 'SqlDatabaseName').SqlDatabaseName
$pgUser = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup and Replication\DatabaseConfigurations\PostgreSql' -Name 'PostgresUserForWindowsAuth').PostgresUserForWindowsAuth
Write-Host "Database Engine: $($activeConfig)"
Write-Output "Connection Settings: $($pgServerName):$($pgPortNumber)"
Write-Output "Database Name: $($pgDatabaseName)"
Write-Output "PostgreSQL User: $($pgUser)"
}
Veeam Backup Enterprise Manager Software Appliance 13
For deployments of Backup Enterprise Manager 13 on Windows, please review the Backup Enterprise Manager v12+ (Windows) section.
To back up the configuration database used by the Backup Enterprise Manager Software Appliance, connect to the Host Management Console and use the Create support logs bundle feature with the Include configuration database check box selected.
The full procedure is documented here:
Enterprise Manager version 12 or higher on Windows
For versions Enterprise Manager older than version 12, please click here to be taken to the legacy section of this article.
Method 1: Identify Using the Configuration Database Connection Settings Utility
- Launch the Configuration Database Connection Settings utility.
- Select Veeam Backup Enterprise Manager to see that product's database connection settings.
- On the Connection Settings tab, take note of Database engine and Connection settings.
- Click Cancel to close the Configuration Database Connection Settings utility making no changes.
Method 2: Identify Using PowerShell
Run the following PowerShell script on the server where Enterprise Manager is installed and it will output the database connection information.
The script below simply pulls information from specific registry values and displays those values in the PowerShell console. No changes will be made to the system.
$activeConfig = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup Reporting\DatabaseConfigurations' -Name 'SqlActiveConfiguration').SqlActiveConfiguration
if ($activeConfig -eq "MsSql") {
$sqlServerName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup Reporting\DatabaseConfigurations\MsSql' -Name 'SqlServerName').SqlServerName
$sqlInstanceName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup Reporting\DatabaseConfigurations\MsSql' -Name 'SqlInstanceName').SqlInstanceName
$sqlDatabaseName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup Reporting\DatabaseConfigurations\MsSql' -Name 'SqlDatabaseName').SqlDatabaseName
Write-Host "Database Engine: $($activeConfig) "
Write-Output "Connection Settings: $($sqlServerName)\$($sqlInstanceName)"
Write-Output "Database Name: $($sqlDatabaseName)"
} elseif ($activeConfig -eq "PostgreSql") {
$pgServerName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup Reporting\DatabaseConfigurations\PostgreSql' -Name 'SqlHostName').SqlHostName
$pgPortNumber = (Get-ItemPropertyValue -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup Reporting\DatabaseConfigurations\PostgreSql' -Name 'SqlHostPort')
$pgDatabaseName = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup Reporting\DatabaseConfigurations\PostgreSql' -Name 'SqlDatabaseName').SqlDatabaseName
$pgUser = (Get-ItemProperty -Path 'HKLM:\SOFTWARE\Veeam\Veeam Backup Reporting\DatabaseConfigurations\PostgreSql' -Name 'PostgresUserForWindowsAuth').PostgresUserForWindowsAuth
Write-Host "Database Engine: $($activeConfig)"
Write-Output "Connection Settings: $($pgServerName):$($pgPortNumber)"
Write-Output "Database Name: $($pgDatabaseName)"
Write-Output "PostgreSQL User: $($pgUser)"
}
Veeam Service Provider Console
Database Backup
If you are providing the database backup to Veeam Support, we ask that you please compress (ZIP) the resulting database backup file before attaching it to the case. This will save bandwidth and time for both you and the support engineer assisting you.
Most database backup files will compress to 15% of their original size.
Instructions for Microsoft SQL (MsSql)
Method 1: PowerShell
*The Backup-SqlDatabse PowerShell cmdlet is part of a module installed with Microsoft SQL and must be run on the Microsoft SQL server itself. The command will fail if Microsoft SQL is not installed on the machine where the cmdlet is executed.
Run the following command, filling in Microsoft SQL connection information and output destination:
*The following command assumes that the Microsoft SQL Instance uses Windows authentication and that the account used to execute the command has the appropriate privileges to perform a database backup.
Backup-SqlDatabase -ServerInstance "ServerName\InstanceName" -Database "DBName" -BackupFile "C:\Temp\DBBackup_$($env:computername)_$(get-date -f yyyy-MM-dd_HH.mm).bak"
Method 2: Microsoft SQL Server Management Studio
- Open Microsoft SQL Server Management Studio (May need to be installed separately)
*It may be necessary to launch SQL Server Management Studio using "Run as Administrator" to prevent permissions-related issues. - Connect to the ServerName\Instance hosting the Database.
- Expand the Databases section.
- Right-click on the desired DB, then from the context menu, select Tasks > Back Up...
- Set Backup Type: to Full
- Set the output to a single file on disk.
(You may need to click remove first, then click add to specify an output location on disk.)
- Click OK to start the Backup process.
Method 3: sqlcmd
*sqlcmd is an application that is installed with Microsoft SQL. If Microsoft SQL is not installed on the machine where the command is executed, sqlcmd will not exist, and the command will fail.
Run the following command, filling in Microsoft SQL connection information and output destination:
*The following command assumes that the Microsoft SQL Instance uses Windows authentication and that the account used to execute the command has the appropriate privileges to perform a database backup.
SqlCmd -E -S ServerName\InstanceName -Q "BACKUP DATABASE [DBName] TO DISK='C:\Temp\DBBackupFilename.bak' WITH STATS"
If you are providing the database backup to Veeam Support, we ask that you please compress (ZIP) the resulting database backup file before attaching it to the case. This will save bandwidth and time for both you and the support engineer assisting you.
Most database backup files will compress to 15% of their original size.
Instructions for PostgreSQL (PostgreSql)
Note:
- The pg_dump example command below does not specify the server name or port as it assumes they are the Veeam Backup & Replication install default connection settings: localhost:5432
- pg_dump is an application that is installed with PostgreSQL. If PostgreSQL is not installed on the machine where the command is executed, pg_dump will not exist, and the command will fail.
- Adjust the backup location to any disk/path with sufficient free space.
- The path to pg_dump.exe will depend on the version of PostgreSQL installed. The example below has been updated from Veeam Backup & Replication 13. Veeam Backup & Replication 12 builds included PostgreSQL 15, and so the path would be "C:\Program Files\PostgreSQL\15\BIN\pg_dump.exe".
In an Administrator elevated PowerShell console, run the following command:
& "C:\Program Files\PostgreSQL\17\BIN\pg_dump.exe" -U postgres -F c -b -f "C:\Temp\PGDBBackup_$($env:computername)_$(get-date -f yyyy-MM-dd_HH.mm).sql" VeeamBackup
Troubleshooting "SSPI authentication failed" Error
The SSPI Authentication error most often occurs when the user account that executed the pg_dump command is not mapped correctly.
pg_dump: error: connection to server at "localhost" (::1), port 5432 failed: FATAL: SSPI authentication failed for user "postgres"
To resolve this issue, review KB4542.
More information
To report a typo on this page, highlight the typo with your mouse and press CTRL + Enter.