Configuring
Prerequisites
The database host with the EDB Postgres Advanced Server environment needs the following components:
IBM supported operating system for Spectrum Protect clients
IBM Spectrum Protect BA client (used for regular file backup)
IBM Spectrum Protect API client
EDB Postgres Advanced Server version 10 or later
Repostor Data Protector client
A PostgreSQL user must be defined for use with the RDP.
This user must be able to connect to EDB Postgres Advanced Server and have sufficient permissions for database backup and restore.
This user needs access to local Spectrum Protect files to read configuration files and to write to log files.
Note
If the user isn't the same user that owns the PostgreSQL server process, make sure that the server process owner has the correct SP client file access so they can execute
archive_command
.
A Spectrum Protect node must be defined in the Spectrum Protect server environment in a management class that suits the needs of the DBA team.
The Spectrum Protect client details for setting up connection to Spectrum Protect server must be available, including the client Spectrum Protect password.
Installing and configuring Repostor Data Protector for PostgreSQL
The high-level steps for installing and configuring the integration are:
- Configure local Spectrum Protect configuration files.
- Install the Repostor Data Protector client.
- Verify the connection to PostgreSQL psql.
- Configure PostgreSQL
archive_command
to use logwriter. - Set up a backup script.
Configure the local Spectrum Protect configuration files
Configure the local Spectrum Protect configuration files with details needed to connect to Spectrum Protect server.
Create a Spectrum Protect options file with the logical server name.
Edit the
dsm.sys
file by adding a section for the new logical server name for this Spectrum Protect node with connection details.Create soft links from the API directory to the ba clients
bin
directory fordsm.sys
anddsm.opt
. This example usesdsm.postgres.opt
Spectrum Protect options for the filename:Here's the listing (
ls -l
command) from the API directory for this example showing the links:Set the
DSMI_CONFIG
variable for the OS user that runs the RDP tools, preferably the same user that owns the PostgreSQL server process.Verify that the OS user can connect to Spectrum Protect server, which also verifies correct file access to local SP files:
Where ‘XXX’ is your logical server name.
Install the Repostor Data Protector client
Verify that IBM Spectrum Protect clients for API and BA are already installed. For example:
Install RDP. (Verify that you have the latest version on www.repostor.com.)
If you're on Ubuntu, you need to prepare the package with the
alien
tool:
Install the license file. The
license.dat
file should be placed in the Repostor/opt/repostor/rdp4Postgres/etc
directory. If no license is available yet, a trial license is generated the first time you run a backup. This trial license needs to be cleared with a specialUNLOCK
key before changing to a contract license.Add the Repostor
bin
directory to the PATH. All users that run RDP commands need to have the PATH set to include the Repostorbin
directory. The path is/opt/repostor/rdp4Postgres/bin
.
Verify the connection to PostgreSQL psql
The user used with the -u
option to the RDP commands must be able to connect to PostgreSQL and be
allowed to back up/restore databases.
For example, to verify the connection for user enterprisedb:
Configure PostgreSQL archive_command
to use logwriter
If your PostgreSQL environment has WAL activated and you plan to back up PostgreSQL on the instance
level (-f
option with RDP), then you need to configure the PostgreSQL archive_command
to run the
RDP logwriter.script
.
For example, this is a sample specification of the archive_command
in the postgresql.conf
file:
Note
The instance name you specify with the -S
option must be the same as the one you use with the RDP postgresbackup
command. The logwriter.script
is a script that calls the logwriter binary. It's a script to allow for local configuration if you want
to set a specific environment before running the logwriter.
Set up a backup script
If you run postgresbackup
from a script that initiated from Spectrum Protect scheduler, set LOGNAME
.
In this example, the paths and filenames are unique to each installation:
Could this page be better? Report a problem or suggest an addition!