Reading Time: 3 minutes

Veeam Backup and Replication support PostgreSQL (only on Linux) using Application-Aware and Guest Processing.

Only in this way you can than use the Veeam Explorer for PostgreSQL during restore, but note that it support only the following PostgreSQL versions on Linux machines: PostgreSQL 12, 13, 14, 15, 16, 17.

To create a transactionally consistent backup of PostgreSQL VM, you must enable application-aware processing and define the settings of WAL files processing.

I’ve tested the procedure using a VM with Rocky Linux 9.2 and PostgreSQL 13 (the version included in Rocky Linux).

In the Guest Processing setting you have to enable application-aware processing and also specify Guest OS credentials.

The account specified at the Guest Processing step must be a Linux user elevated to root. The account must have the home directory created.

In my case, I’ve just create a veeam user (with password):

sudo adduser veeam
sudo passwd veeam
sudo usermod -aG wheel

Then click on Applications button.

  1. In the Processing Settings window, click the PostgreSQL tab.
  2. From the Specify PostgreSQL account with superuser privileges drop-down list, select a user account that Veeam Backup & Replication will use to connect to the PostgreSQL instance. 

To back up PostgreSQL instances, the account must have the superuser privileges for the PostgreSQL instance. For more information, see PostgreSQL documentation.

There are three different way to specify the database credential. I’ve choose the system user to avoid specific database user creation.

System user without password file (peer) if you want Veeam Backup & Replication to use the peer authentication method. In this case, Veeam Backup & Replication will use the account you specified at the step 2 as the OS account and as the PostgreSQL account to connect to PostgreSQL. For more information about the peer authentication method, see PostgreSQL documentation.

The user postgres is without password and is the default database sysadmin in Rocky Linux.

To enable peer authentication method you need the folloging rows in the /var/lib/pgsql/data/pg_ident.conf file:

#PostgreSQL User Name Maps
#MAPNAME SYSTEM-USERNAME PG-USERNAME
backup postgres postgres
backup veeam postgres

Then you need to configure also the /var/lib/pgsql/data/pg_hba.conf file:

#Veeam
local all postgres peer map=backup

If all is working properly, you will see the database backup in your /var/lib/pgsql/data/log/postgresql-*.log file with some rows like this:

2025-05-10 17:08:36.851 CEST [16316] LOG: restore point "2025-05-10 15:08:36 GMT" created at 0/3000090
2025-05-10 17:08:36.851 CEST [16316] STATEMENT: SELECT CAST(pg_create_restore_point AS varchar) FROM pg_create_restore_point($1);

To check that the user is configured properly you can try to connect to the database using this command:

sudo -u veeam psql -U postgres

Finally you can use the Veeam Explorer to manage DB restore:

Share