Restoring the PostgreSQL Server

When the PostgreSQL Server is corrupted or lost, you can restore and recover it from the latest full backup. Both the data and the logs can be restored using the FSBasedBackupSets.

If you are using PostgreSQL version 12 or later, follow the steps mentioned in Consideration for Restoring FSBased Backup Set on PostgreSQL 12 and later.

Before You Begin

  • Stop the PostgreSQL server before performing the File System restore to recover the entire PostgreSQL server.

  • Delete or rename the data directory, user tablespace directory, archive log directory and transaction log directory that is outside the data directory.

  • Restore the File System backups of same version of PostgreSQL and not from higher to lower or lower to higher.

Procedure

  1. From the CommCell Browser, navigate to <Client> | PostgreSQL | <Instance>.

  2. Right-click FSBasedBackupset, and then click All Tasks | Browse and Restore.

  3. Click View Content.

  4. Select the data that you want to restore and click Recover All Selected.

    The PostgreSQL Database Restore Options dialog box is displayed.

  5. Optional: If you do not want the PostgreSQL Server to start automatically after the restore operation is complete, clear the Recover Database Server check box.

  6. Click OK.

Notes

  • By default, the server is restored to the data directory path according to the source data directory path. Port information and archive log directory information are obtained from the destination instance.

  • Clear the Recover Database Server check box in the following two scenarios:

    • If you do not want the PostgreSQL Server to start automatically after the restore operation is complete.

    • If you are restoring an instance that has a UNC path as its Archive Log Directory. After the restore is complete, you can start the PostgreSQL Server manually.

    fs_restore1

Loading...