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.
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
-
From the CommCell Browser, navigate to <Client> | PostgreSQL | <Instance>.
-
Right-click FSBasedBackupset, and then click All Tasks | Browse and Restore.
-
Click View Content.
-
Select the data that you want to restore and click Recover All Selected.
The PostgreSQL Database Restore Options dialog box is displayed.
-
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.
If you are using PostgreSQL 12 or later, follow the steps mentioned in Consideration for Restoring FSBased Backup Set on PostgreSQL 12.
-
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.
-