PostgreSQL on Ubuntu 2022.4 Installation & Configuration for Veeam Purposes

This post was originally published on this site

For no reasons whatsoever I find myself working quite a bit with the recent integrations of Veeam products with PostgreSQL, letting it function as the underlying database server for 1 (or more) Veeam products. Postgres as well as the Linux aspect are interesting for highly scaled environments both because it’s powerful but also, frankly, because it’s cheap.

In this post I’ll quickly walk through my golden set of instructions for deploying, configuring and optimizing a PostgreSQL 16 server (latest version) for use with Veeam Backup & Replication.

Configure encrypted connections over TLS via instructions at https://www.postgresql.org/docs/current/ssl-tcp.html
Import PostgreSQL repo and install from apt
# Create the file repository configuration:
sudo sh -c ‘echo “deb https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)
-pgdg main” > /etc/apt/sources.list.d/pgdg.list’
# Import the repository signing key:
wget –quiet -O – https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add –
# Update the package lists and install the latest version of PostgreSQL:
sudo apt update && apt install postgresql
# If you want a specific version, use ‘postgresql-12’ or similar instead of ‘postgresql’:
Set a password for the default postgres account
sudo -u postgres psql
ALTER USER postgres PASSWORD ‘myPassword’;
ALTER ROLE #this should be valid response
q #exit postgres
Allow remote connections
#edit the service conf file. number aligns to installed

Want to learn more? Read the source post!