Restoring your backup data is crucial, therefore you should perform a restore operation immediately after your first full backup so that you understand the process.
Before You Begin
Verify that you are restoring the File System backups of the same version of PostgreSQL and not from higher to lower or lower to higher.
Make sure to stop the destination PostgreSQL server.
Make sure to delete or rename the data, tablespace, archive log directories and transaction log directory that are outside the data directory.
Procedure
-
From the CommCell Browser, navigate to Client Computers| <Client> | PostgreSQL.
-
Right-click the <Instance>, and then click All Tasks | Restore PostgreSQL Server.
The PostgreSQL Database Restore Options dialog box appears.
-
Select Restore in place. Click Next.
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.
-
For PostgreSQL clients with the latest version of indexing, complete the additional information:
-
In the Number of Streams box, enter the number of streams to use in the restore operation.
By default, the number of streams is set to 2.
-
To clean up data, tablespace, and archive log directories before performing the restore operation, select the Cleanup old directories check box.
If you do not select the Cleanup old directories check box, stop the PostgreSQL server and delete or rename the data directory, user tablespace directory, archive log directory, and transaction log directory that is outside the data directory.
-
To start the PostgreSQL Server, in the Custom start command box, enter the command.
Examples:
-
On a RHEL computer, enter the
systemctl start postgresql-15
custom command to start PostgreSQL as a service. -
On a Window Server 2012 R2 computer, enter the
sc start postgresql-x64-13
custom command to start PostgreSQL as a service.Note
If you leave the Custom start command box empty, the Commvault software uses the
pg_ctl
command to start the PostgreSQL Server.
-
-
-
To avoid starting the PostgreSQL server automatically after the restore operation is complete, clear the Recover Database Server check box.
-
Click OK.
You can monitor the progress of the restore job in the Job Controller.
-
Once the database is restored, verify that the restored database and log files are available in the original location.