NetBackup™ Web UI PostgreSQL Administrator's Guide
- Overview
- Managing PostgreSQL instances and databases
- Managing PostgreSQL environment credentials
- Protecting PostgreSQL instances and databases
- Restoring PostgreSQL Instances and Databases
- Troubleshooting PostgreSQL operations
- API for PostgreSQL instances and databases
Steps to perform after Restore and Recovery for PostgreSQL cluster deployment
The following procedure is applicable for snapshot
and pg_basebackup
backup methods, and not applicable for the pg_dumpall
and pg_dump
backup methods.
If the recovery done from backup of PostgreSQL primary node to same or alternate primary node, do the following on the PostgreSQL standby node:
Stop PostgreSQL services.
Clean the PostgreSQL data directory path.
Run the $ pg_basebackup -h primary_node_ip -U db_replication_user --checkpoint=fast -D data_directory_path -R --slot=unique_slot_name -C command with database user.
Start the PostgreSQL services.
If the recovery done from backup of PostgreSQL standby node to same or alternate primary node, do the following on the PostgreSQL primary node:
Stop the PostgreSQL services.
Delete the
standby.signal
file from the data directory.Fix the archive command in
postgresql.conf
file from data directory.For example: For Linux: archive_command='cp %p /path/to/archive/location/%f' and for Windows: archive_command = 'copy "%p" "path\\to\\archive\\location\\%f"'
Start the PostgreSQL services.
PostgreSQL standby node:
Stop PostgreSQL services.
Clean the PostgreSQL data directory path.
Run the below command with database user:$ pg_basebackup -h master_node_ip -U db_replication_user --checkpoint=fast -D data_directory_path -R --slot=unique_slot_name -C
Start the PostgreSQL services.
Note:
When the recovery is done from backup of PostgreSQL primary node to PostgreSQL standby node, then the standby node becomes an independent primary node.