1. Bocada Cloud Support Portal
  2. Connectors & Backup Applications

How do I create a PostgreSQL user for Veeam data collection?

How to create a PostgreSQL user for Bocada Cloud Data Collection Agent to collect data from a Veeam PostgreSQL database.

Veeam Database

The Bocada Cloud Data Collection Agent requires access to the Veeam database with a PostgreSQL user to collect data, and a new user must be created. 

Temporary Update to hba_pg.conf file

Prior to making any changes to the pg_hba.conf file, ensure you have made a backup copy, e.g., copy to pg_hba_<date>.conf.

First, add a temporary entry in the pg_hba.conf file to enable the addition of a user:


Reload pg_hba.conf (1st time)

Reload the pg_hba.conf file by running the following command from the Veeam DB Bin directory:

pg_ctl.exe reload –D <Full_path_to_Veeam_DB_Data_Directory>

Create a new PostgreSQL user

Next, create the PostgreSQL Database User and password using the following command located the in Veeam DB Bin directory:

createuser.exe -p <port> -h <Veeam_DB_Host_IP> -U postgres –P –s <new username>

Notes for creating a user:

  • The default port for PostgreSQL is 5432. Use this value unless a different port is being used.
  • The username must be all lower case. No capital letters may be used.
  • Use the IP address of your Veeam server.
  • Once you run the command above, you will be asked to “Enter password for new role”, then “Enter it again” (see screenshot below).

    If the system asks for a password a third time, there is an error and you should review all prior steps. Possible reasons for an error are that the new entry in the pg_hba.conf is incorrect, or the pg_hba.conf has not been reloaded.

The following example command will add a user named bocada:

Reduce access in pg_hba.conf

Update the temporary  pg_hba.conf entry added above to reduce access to only the specific user added from the IP Address of the Bocada Cloud Data Collection Agent, for example:

Reload pg_hba.conf (2nd time)

Reload the pg_hba.conf file by running the following command from the Veeam DB Bin directory:

pg_ctl.exe reload –D <Full_path_to_Veeam_DB_Data_Directory>

See also: How to configure connection to PostgreSQL for additional details related to updating the pg_hba.conf file.