Please enter search query.
Search <book_title>...
NetBackup™ Web UI PostgreSQL Administrator's Guide
Last Published:
2023-03-31
Product(s):
NetBackup & Alta Data Protection (10.2)
- 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 recovery after restore operation
The procedure to perform post recovery is as follows for various platforms:
For Windows (VSS):
- Go to Control Panel > System and Security > Administrative Tools >Services.
- Select PostgreSQL service and stop it.
- Delete or move everything from PostgreSQL data directory.
Note:
Post restore, change the attributes of the restored data directory and files by using the following command:
attrib -S <restore_path>/*.* /S /D
- Copy all the contents of restored data directory to PostgreSQL data directory.
- Create an empty file in data directory and name it
recovery.signal
. - Start PostgreSQL service.
For Linux (LVM):
- Stop PostgreSQL services.
- Copy all the contents of restored data directory to PostgreSQL data directory.
- Create an empty file with name
recovery.signal
in data directory. - Change ownership of PostgreSQL data directory.
For example:
chown -R postgres:postgres <full/path/of/PostgreSQL/Data/Dir>
- Start the PostgreSQL service.
Recovery steps for backup done by pg_basebackup utility
- Stop PostgreSQL services.
- Delete or move everything from PostgreSQL data directory.
- Extract and copy the data directory and WAL directory contents to respective location.
- Create an empty file with name
recovery.signal
in data directory. - (For Windows) Provide access to data directory for network service.
- (For Linux) Change ownership of PostgreSQL data directory and permission to 700.
For example:
chown -R postgres:postgres </full/path/of/PostgreSQL/Data/Dir> chmod - R 700 <full/path/of/PostgreSQL/Data/Dir>
- Start PostgreSQL service.
Note:
Remove the restore data from restored path
</full/path/of/restore/directory>
after successful recovery, else next backup job may fail.
Database recovery steps for backup done by pgdump utility
For Windows: pg_restore -U <username> -d <dbname> <full\path\to\dump\file>\filename.dump
For Linux: pg_restore -U <username> -d <dbname> <full/path/of/dump/file>/filename.dump