NetBackup™ for PostgreSQL Administrator's Guide
- Overview
- Managing PostgreSQL instances and databases
- Managing PostgreSQL environment credentials
- Protecting PostgreSQL instances and databases
- Restoring PostgreSQL Instances and Databases
- Things to know before you restore the PostgreSQL instances and databases
- About the pre-restore check
- Restore PostgreSQL instance and database
- Restore target options
- Pre-restore checks for PostgreSQL
- Steps to perform recovery after restore operation
- Steps to perform after Restore and Recovery for PostgreSQL cluster deployment
- Limitations
- Troubleshooting PostgreSQL operations
- Troubleshooting tips for NetBackup for PostgreSQL
- Error during PostgreSQL credential addition
- Error during the PostgreSQL instances and databases discovery phase
- Error during the PostgreSQL Protection Plan Creation
- Error while subscribing protection plan to PostgreSQL asset
- Error while removing PostgreSQL asset
- Error while backup of PostgreSQL asset
- Error while restoring PostgreSQL asset image
- API for PostgreSQL instances and databases
- Index
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.signalfile from the data directory.Fix the archive command in
postgresql.conffile 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.