Configuring Repostor Data Protector for PostgreSQL
Suggest editsPrerequisites
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 above.
Repostor Data Protector client.
A PostgreSQL user needs to be defined for use with the RDP.
This user needs to 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 is not 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 needs to 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 needs to be available including the client Spectrum Protect password.
Installation and configuration of Repostor Data Protector for PostgreSQL
The high-level steps for installing and configuring the integration are:
- Configure local Spectrum Protect configuration files.
- Install 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 Spectrum Protect options file with the logical servername.
Edit the
dsm.sys
file by adding a section for the new logical servername for this Spectrum Protect node with connection details.Create soft links from the API directory to the ba clients bin directory, for
dsm.sys
anddsm.opt
. This example usesdsm.postgres.opt
Spectrum Protect options filename:Here is the listing (
ls -l
command) from API directory for this example showing the links:Set the
DSMI_CONFIG
variable for the OS user that runs the RDP tools. This is preferably the same user that owns the PostgreSQL server process.Verify that the OS user can connect to Spectrum Protect server. This also verifies the correct file access to local SP files.
where ‘XXX’ is your logical servername.
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 latest version on www.repostor.com):
If you are 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 automatically generated the first time a backup is run. 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 needs to be able to connect to PostgreSQL and be
allowed to backup/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 backup 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 needs to 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 is 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, you should set LOGNAME
.
Note that the PATHs and filenames are unique to each installation in this exampple:
Could this page be better? Report a problem or suggest an addition!