Ransomware attackers specifically target and attempt to destroy backup systems to increase the probability of payment. Hardening your system is critical. Please ensure you have reviewed your platform security using the Security Hardening Checklist
Cohesity

COHESITY Documentation

Explore our documentation to get started, discover products & new features, access troubleshooting guides, register sources, platforms support.

Products
Data Security Alliance
Visit Cohesity.com
Demos
Support
Blogs
Developers
Partner Portals
Cohesity Community
© 2026 Cohesity, Inc. All Rights Reserved.
Terms of Use|
Privacy Policy|
Legal|
  1. Home
  2. Veritas NetBackup™ for PostgreSQL Administrator's Guide
  3. NetBackup for PostgreSQL backup and restore
  4. Recovering the restores
Veritas NetBackup™ for PostgreSQL Administrator's Guide

Recovering the restores

After a successful restore, to recover the restore, copy the recovery.conf.sample file to the PostgreSQLdata directory. The recovery.conf.sample is available at the PostgreSQL install path. Ensure that after you copy the recovery file, remove the .sample extension.

When you set the parameters and restart the PostgreSQL services, the server goes into the recovery mode and reads the archived WAL files. If the recovery gets terminated, you can restart the server to continue the recovery process.

After successful completion, the server renames the recovery.conf file to recovery.done to prevent re-entering into the recovery mode.

In Linux operating system, the owner and group defaults to postgres after a successful restore. You must change the ownership to PostgreSQL owner and modify the settings according to your environment.

The recovery.conf configuration file

The recovery.conf file contains the parameters that you must set to enable archive recovery or act as a replication standby. The parameters must be set again for the subsequent recovery that you must perform.

Table: The recovery.conf file parameters lists the parameters that you must set to enable archive recovery.

Table: The recovery.conf file parameters

Parameters

Description

restore_command

This parameter specifies the shell command that is executed to copy log files back from archival storage. This parameter is required for archival storage but is optional for streaming replication. The command string may contain %f that is replaced by the name of the desired log file and %p is replaced by the absolute path to copy the log file to.

recovery_target

This parameter stops the roll-forward at a specific point. By default, the recovery rolls forward to the end of the WAL log.

Performing the restore recovery

To recover the restore

  1. Stop the PostgreSQL services.
  2. Copy the restore data into the PostgreSQL data directory.
  3. (Linux) Change the ownership to PostgreSQL user.
  4. Copy the recovery.conf file to the PostgreSQL data directory and remove the .sample extension .
  5. (Linux) Change the ownership to the PostgreSQL user and modify the settings according to your environment.
  6. Edit the recovery.conf file to set the following:
    • (Windows) Mention the restore_command parameter as cp "<PostgreSQL-data-directory>\\pgarchive\\%f" "%p"

    • (Linux) Mention the restore_command as cp <PostgreSQL-data-directory>/pgarchive/%f %p

    • Remove the pause_recovery_target parameter.

  7. Start the PostgreSQL services.
  8. After successful recovery, delete the pgarchive directory and the recovery.done file.

Feedback

Was this page helpful?
Previous

Redirected restores

Next

Disaster recovery

Feedback

Was this page helpful?