You can perform a redirect restore operation to redirect all tablespaces and databases to a different path in the destination client. You can run a redirect restore operation when the current path has run out of space and you want to redirect the data directory to a different location, or for troubleshooting. You can redirect an entire database (all tablespaces) to a new client.
Limitations
- You can perform redirect restore operations only on FSBased backup set.
Before You Begin
-
Verify that you have a PostgreSQL instance on the CommCell Console both at the source server and the destination server.
-
The versions of PostgreSQL on both the source server and the destination server must be the same.
-
Create a PostgreSQL instance on the destination client.
For steps to create a PostgreSQL instance, see Creating an Instance.
-
If you are performing a redirect restore on the same server, but a different location, verify that you have enough space in the new location. The PostgreSQL user should also have full access to the new location.
-
Run a backup operation from the default subclient of an FSBased backup set.
Procedure
-
From the CommCell Browser, navigate to client > PostgreSQL > source_instance.
-
Right-click FSBasedBackupset, and then click All Tasks > Browse and Restore.
-
Click View Content.
-
Select the data that you want to restore, and then click Recover All Selected.
The PostgreSQL Database Restore Options dialog box appears.
-
Select Restore out of place. Click Next.
-
To restore objects to a different client, from the Destination Client list, select the name of the destination client.
-
To restore objects to a different instance, from the Destination Server list, select the name of 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.
-
-
-
If one or both of the following are true, then clear the Recover Database Server check box:
-
You do not want the PostgreSQL Server to start automatically after the restore operation is complete.
-
You are restoring an instance that has a UNC path as its Archive Log Directory. After the restore operation is complete, you can start the PostgreSQL Server manually.
-
-
To enable redirect restore operation, on the Redirect tab, select the Redirect check box.
-
From the Source Path column, select a path that you are restoring data from.
-
In the New Path box, you can type or browse to the new destination path where you want to restore the data.
Note
Verify that the new path in the destination client is empty. If you are redirecting to a different path on the same server, the source and the destination instances would be the same. Provide a different location on the same server to redirect the restore. If you select the Cleanup old directories check box and enter a new path for restore, the Commvault software will clean up the new path .
-
Click Apply to select the new destination path.
-
Click OK to run the redirect restore operation.
Results
-
The Data files for the server are restored to the new paths that you specified.
-
Transaction logs are restored to the archive log directory that is specified on the destination instance.