Since Veeam Backup & Replication version 12.1.2.172 there is a new check in the Security & Compliance Analyzer that checks the recommended settings of the PostgreSQL database.
After all my last updates to version 12.1.2.172, the analyzer showed the settings as non-compliant.
However, this is quite easy to fix. There are different ways to do this, depending on whether you have installed the database directly on the VBR server or installed it on a remote PostgreSQL server or on a remote PostgreSQL server that is not used as a configuration database.
Before performing the steps, you must check that no active jobs are currently running. Active jobs read and write in the database and this could cause problems afterwards.
1a local installation:
It is very simple with the local installation. Here, the parameters of the current server are retrieved and adjusted directly.
It is enough to open the Powershell as “administrator” and execute the following command:
Set-VBRPSQLDatabaseServerLimits
1b remote Installation
When the PostgreSQL database is installed on a separate server, the parameters of the server must also be specified, because they cannot be retrieved automatically using this way.
If you enter the command without parameters, the following message appears, informing you that automatic configuration on the remote PostgreSQL is not possible.
Therefore, open the Powershell as “administrator” and simply attach the parameters of the PostgreSQL server:
Set-VBRPSQLDatabaseServerLimits -OSType <String> -CPUCount <Int32> -RamGb <Int32>
Example:
Set-VBRPSQLDatabaseServerLimits -OSType Windows -CPUCount 16 -RamGb 32
1c Dump File
If the PostgreSQL instance is installed on a remote PostgreSQL server and is not currently used as a configuration database, a dump file with the required settings must be created. The dump file contains the queries to be set. The queries can be set directly on the database with the dump.
All parameters of the PostgreSQL server must also be specified here, but a path for the dump file is also specified.
Set-VBRPSQLDatabaseServerLimits -OSType <String> -CPUCount <Int32> -RamGb <Int32> -DumpToFile <String>
Example:
Set-VBRPSQLDatabaseServerLimits -OSType Windows -CPUCount 16 -RamGb 32 -DumpToFile c:\temp\postgresqlsettings.sql
2. Restart Service
After the database adjustments have been made, the Postgres database service must be restarted.
It is recommended to stop the Veeam services before and start them again after the database service restart.
3. Check
After re-analyzing, the Security & Compliance Analyzer should now look like this:
Important:
After each hardware change (RAM, CPU), the command with the corresponding parameters must be executed again.