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. In the Backup logs every field, specify how frequently you want WAL logs to be backed up. The maximum field value is 480 minutes.
  2. 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, the accounts specified for accessing the VM guest OS is used. To change this behavior, you can choose another account from the Specify PostgreSQL account with superuser privileges drop-down list on the PostgreSQL tab.

For an account to be displayed in the Credentials list, 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.

Since PostgreSQL supports different ways of user authentication, you must specify the type of a user account you use to access the PostgreSQL instance:

  • For a PostgreSQL account with credentials configured in the Credential Manager, select the Database user with password option.

When adding the account in the Credentials Manager, you can leave the password field empty, if you want Veeam Backup & Replication to use the username map authentication. In this case, VM guest OS credentials will be used as SYSTEM-USERNAME and the PostgreSQL account username will be used as PG-USERNAME. For more information on the user name maps, see PostgreSQL documentation.

  • For a PostgreSQL account that obtains a password from the .pgpass configuration file on the PostgreSQL VM, select the Database user with password file (.pgpass) option.

The password file must be located in the user home directory. For more information on the password file, see PostgreSQL documentation.

  • For a system account that is used for peer authentication with the PostgreSQL instance, select the System user without password file (peer) option.

The selected account must be granted sufficient permissionsVeeam Backup & Replication will use the system username as a PostgreSQL username and will require no password. For more information on peer authentication, see PostgreSQL documentation.

PostgreSQL WAL Files Settings 

Page updated 8/25/2025

Page content applies to build 13.8.0.582