Specifying PostgreSQL WAL Files Settings

By default, Veeam Backup & Replication creates application-consistent image-level backups of VMs running the PostgreSQL Server application and does not truncate write ahead logs (WAL) after each successfully completed backup session — this allows you to restore PostgreSQL Server databases using specific backups. To protect mission-critical PostgreSQL Server databases, you can instruct Veeam Backup & Replication to create secondary restore points with WAL logs in addition to primary image-level backups — this will allow you to restore your databases to specific points in time.

NoteS

  • Veeam Backup & Replication stores image-level backups and WAL log backups in the same repository.
  • If Veeam Backup & Replication fails to produce a primary image-level backup, no secondary WAL log backups will be created.

To back up PostgreSQL WAL logs periodically, do the following:

  1. Switch to the PostgreSQL tab.
  2. In the Backup logs every field, specify how frequently you want WAL logs to be backed up. The maximum field value is 480 minutes.
  3. In the Retain log backups section, choose either of the following options:
  • Select the Until the corresponding image-level backup is deleted option if you want to remove WAL log backups and the related image-level backups at the same time, according to the retention policy settings specified at step 4.
  • Select the Keep only last <N> days of log backups if you want to retain WAL log backups for a specific time period, regardless of the retention policy settings specified for image-level backups. Note that WAL log backups must always be retained for a longer period than image-level backups.

For more information on how Veeam Backup & Replication retains WAL logs, see the Veeam Backup & Replication User Guide, section Retention for PostgreSQL WAL Files.

  1. In the Temporary location for archive logs section, specify the path to a folder on the PostgreSQL machine where Veeam Backup & Replication will temporarily store archive logs until they are backed up.

Keep in mind that you must create the folder beforehand manually. Also, make sure that there is enough free space in this folder for the log files and required permissions are granted to the user account.

  1. In the Log shipping servers section, decide whether you want to use a specific server to transfer WAL log backups or let Veeam Backup & Replication choose it automatically to reduce the load on the backup server.

By default, Veeam Backup & Replication automatically chooses a log shipping server for each of the processed VMs based on network settings and rules listed in the Veeam Backup & Replication User Guide, section Log Shipping Servers. You can also manually limit the list of machines that may be used as log shipping servers — to do that, click Choose, select the Use the specified servers only option and then select check boxes next to the necessary servers.

For a server to be displayed in the list of available log shipping servers, it must be added to the backup infrastructure as described in the Veeam Backup & Replication User Guide, sections Adding Microsoft Windows Servers and Adding Linux Servers.

TiPS

  • It is recommended that you choose at least 2 log shipping servers for load balancing and high availability purposes.
  • It is recommended that you do not choose servers that are engaged in permanent tasks consuming resources (such as WAN accelerators and backup servers).

Configuring Access to PostgreSQL

To access databases of the processed PostgreSQL Server instances, Veeam Backup & Replication uses accounts with superuser privileges — by default, these are the accounts you specify for accessing the VM guest OSes. To change this behavior, you can choose another account from the Specify PostgreSQL account with superuser privileges drop-down list. For an account to be displayed in the list of available accounts, it must be added to the Credentials Manager as described in the Veeam Backup & Replication User Guide, section Credentials Manager. If you have not added the necessary account to the Credentials Manager beforehand, you can do it without closing the New Job wizard. To do that, click either the Manage accounts link or the Add button, and specify the user name, password and description in the Credentials window.

After you specify an account, you must also explicitly specify whether this account is a PostgreSQL database account (whose password is stored either in the Credentials Manager or in a configuration file) or a system account. In the latter case, make sure that the account has all the permissions required to access the PostgreSQL Server instance; for more information on the required permissions, see Planning and Preparation.

Important

Consider the following:

  • If the password that is stored in the Credential manager is empty, Veeam Backup & Replication will be able to use this account by leveraging username map authentication. In this case, the SYSTEM-USERNAME variable value will be set to the name of the account used to access the VM guest OS, while the PG-USERNAME variable value will be set to the name of the account that you have selected from the Specify PostgreSQL account with superuser privileges drop-down list. For more information on username map authentication, see PostgreSQL documentation.
  • If the password is stored in a .PGPASS configuration file, make sure that it is located in the /home directory of the selected account. For more information on .PGPASS files, see PostgreSQL documentation.

Depending on whether the resource selected for application-aware processing at step 5a is an individual VM or is a container for multiple VMs (protection domain, cluster, category or Prism Central), the specified account will be used to access the PostgreSQL Server instance of one VM or all VMs that belong to the selected resource.

PostgreSQL WAL Files Settings 

Page updated 10/2/2025

Page content applies to build 13.8.0.582