Skip to main content

hi all

we try here to create for our Postgres Servers to create a backup job with the Veeam for Postgres WAL Feature, so the agentless Version, of storing the WAL Files in a Backup. But i get it not to work. I see bulent his video, i look that i make all Documentation Settings in our Postgres Instances, but it will not work. But we have one great difference. We dont use the linux standard installation of postgres. so no /etc/postgres is there. we use a automated installation of postgres with ansible, but in different directories. example. the software itself is in /u01/app/postgres/product. the data dir is in /u02/pgdata/instancename, and the archive dir is in /u03/pgdata/archive/instancename. so i am not sure, how i can say in veeam to look in that locations for the WAL Files. the only info we have in /etc is the /etc/pgtab. did anyone know how to get Postgres WAL Backup running with a non standard postgresql installation?

regards franco

If you check out the help there is an XML file you can create to specify custom locations for Posgres so the Veeam Agent will find it for backup.  See this link - PostgreSQL Backup - Veeam Agent for Linux User Guide


This is the part from that page you want to read -

By default, Veeam Agent recursively scans the /etc/postgresql, /var/lib/postgresql and /var/lib/pgsql directories for the configuration files of PostgreSQL instances. If your instance is stored in a custom location, you must specify its location in the PostgreSQL configuration file — VeeamPostgreSQLAgent.xml. You must create this file in the /etc/veeam/ directory. To explicitly include or exclude specific directories in/from processing, you can use the following elements in the configuration file:

  • AddConfigDirs — use this element to specify paths to directories that you want Veeam Agent to scan.
  • ExcludeConfigDirs — use this element to specify paths to directories that you do not want Veeam Agent to scan.

TIP

You can specify directories that you want to include and directories that you want to exclude in the same configuration file.

An example of the VeeamPostgreSQLAgent.xml file:

<config AddConfigDirs="/opt/psql/" ExcludeConfigDirs="/var/lib/postgresql/13/main45/,/var/lib/postgresql/13/maindd/" />

IMPORTANT

The configuration file must be formatted as a single line XML.


hi chris, i did read this also, because we make a long time ago the test with the local installation of a veeam agent on our redhat linux systems. but now a admin have removed this veeam agent last time, so i have no /etc/veeam directory. but when i understand you correct, it need this agent also, so not agentless, because that is in the docu of veeam, that it is agentless. so in the awareness application tab, i have also a exclude dir and include dir, that is not the same than? i mean i am not sure now, did i need a installed veeam agent on that linux vm?

regards franco

 

example, product bin:

/u01/app/postgres/product/13/db_14/bin/pg_ctl 

example, postgres.conf from instance1:

/u02/pgdata/13/instance1/postgresql.conf

include dir is than: /u01/app/postgres/product/13/db_14 ?


From what I know you require the agent for Postgres backups on Linux based on the documentation.  So you may need to install it again to get the XML file option.


ok, i will give it a try


Keep us posted once you test and if it works we can mark this thread solved with the best answer.


so, i create now this VeeamPostgreSQLAgent.xml file under /etc/veeam, and add our directories in. now i get a failure from all 12 instances i have installed, because the veeam agent only look into port 5432, but yes, also this is customized by us, so every instance is from 55441 to 55453. so where i can say him, to look into /etc/pgtab where are the ports also is there! i mean to be sure, the ports are also stored in the postgresql.auto.conf file, so dont understand why this agent looks not first into config, and than open it than over correct port! the normal postgresql.conf for sure, have not this port 5432 enabled it is comment out!

failure in veeam backup job:
Failed to explore PostgreSQL instance server01:5432 : Command explore_instance completed with error. No response from PostgreSQL server on port 5432.

thats clear, my instances are on 55441 to 55453 :)

i see no way in the documentation for that scenario! any ideas here from community?

 

regards

franco


I have never changed the port for Postgres so unsure how you would get the agents to check there.  I will see if I can use Dr Google to find something, but Veeam uses specific ports usually.


yes, that is a little bit a great problem of this documentation, so you dont see what veeam looks into for config files, so what are this files? postgresql.conf, pg_hba.conf, pg_ident.conf, postgresql.auto.conf. so it would be very helpfull if this will updated in the postgres veeam docu. also, no great companies will be use postgresql in default installation and location, so sure not in a bank 🙂. so we configure our postgresql with the postgresql.auto.conf file. not with this postgresql.conf default file. also we use custom ports, also no companies with more as one instance will use default ports. so maybe the agent must be adapted to look also in postgresql.auto.conf file, there the port and also location from postgres is in.

maybe we can forward that to some peoples who can make requests or so?

 

regards

franco


If you want to add suggestions then you need to put that in the forums so PMs see it - https://forums.veeam.com

Have you tried putting the port you are using in the default Postgres configuration file to see if that helps?


i add the ports now in the postgresql.conf file, and will wait now, and look if it helps! i will inform you!


i add the ports now in the postgresql.conf file, and will wait now, and look if it helps! i will inform you!

Thanks.  Keep me posted as this is the only thing I can think of to get around this.  😋

 
 
 

hi all, so for now, backup from WAL Files looks good, it creates a correct Backup Job, and i can browse within the PostgreSQL Explorer. BUT, restore is not possible. with the postgres user, i have no root rights, and when i take a temp root user, after connectiong i get a error:
Cannot find pg_ctl utility in the default location.

Sure this temp root user did not know, where postgres is in. there is no env configured. but i mean, that is very bad, because it should take root user only for the root task, and go then further with the postgres user itself. is there a way, to configure that, or is veeam here not configurable?

regards franco


hi all, so for now, backup from WAL Files looks good, it creates a correct Backup Job, and i can browse within the PostgreSQL Explorer. BUT, restore is not possible. with the postgres user, i have no root rights, and when i take a temp root user, after connectiong i get a error:
Cannot find pg_ctl utility in the default location.

Sure this temp root user did not know, where postgres is in. there is no env configured. but i mean, that is very bad, because it should take root user only for the root task, and go then further with the postgres user itself. is there a way, to configure that, or is veeam here not configurable?

regards franco

I found the same similar issue when you have the option to take a backup of the DB before restore and when you uncheck that it works fine.  Not sure why but it is looking for PG utilities local on the VBR server I believe.


what you mean with uncheck, what for a setting?


what you mean with uncheck, what for a setting?

Sorry I am thinking about Configuration Backup restore/migration.  My apologies as this is to restore a PG database correct?


yes i try a restore from instances, but get the error pg_ctl. i found this article here: https://forums.veeam.com/veeam-backup-replication-f2/cannot-find-pg-ctl-utility-explorer-for-postgresql-t91953.html

so my veeam console is on a server where i connect to a other server, i think this other server is than the server where i must add this config.xml. because on the server where only the veeam console is installed, it is not working, but i hope my thoughts are wright!

 

regards franco


yes i try a restore from instances, but get the error pg_ctl. i found this article here: https://forums.veeam.com/veeam-backup-replication-f2/cannot-find-pg-ctl-utility-explorer-for-postgresql-t91953.html

so my veeam console is on a server where i connect to a other server, i think this other server is than the server where i must add this config.xml. because on the server where only the veeam console is installed, it is not working, but i hope my thoughts are wright!

 

regards franco

Yes that thread is familiar.  I am sure if you do the XML file hopefully it works to address the problem.  Keep us posted here and on the final solution.


Comment