Cluster to a Single Client
Procedure
To perform Cluster to a single client FSBased out-of-place restore, proceed as follows:
-
From the CommCell Browser, navigate to client > PostgreSQL > PostgreSQL Cluster Client.
-
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 and then click Next.
-
To restore objects to a different physical client, from the Destination Client list, select the name of the physical destination client.
-
To restore objects to a different instance, from the Destination instance list, select the name of the destination instance.
-
In the Number of Streams box, enter the number of streams to use in the restore operation.
-
Select the Recover Database Server checkbox. You can uncheck the Recover Database Server checkbox 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.
-
-
In the Server start command box, specify a command if any custom server start command needs to be used for a particular client.
-
If you change the data directory from the default path to a desired path, select the Redirect checkbox.
Note
If you select a new path, make sure that the configuration files available in the default path are also present in the new path.
-
In the New Path box, you can type or browse to the new destination path where you want to restore the data.
-
Click Apply to select the new destination path.
-
Click OK to run the redirect restore operation.
Cluster to Cluster Client
Note
For restore to a particular time, the pg_rewind utility is used to rewind PostgreSQL data directory in standby nodes to match the state of the master node. Make sure that the wal_log_hints was set to on in the configuration file or that the data checksums were enabled during cluster initialization in order for pg_rewind to run successfully. For more details, see pg_rewind.
Pre-requisites
-
Make sure that the cluster manager is set up properly and the cluster is up in the destination cluster.
-
For Snap and Block-level instances, stop the PostgreSQL server on the destination nodes before initiating the restore. Clean up the data, tablespace, and archive log directories, ensuring that the required configuration files are preserved.
-
If the destination cluster is down before starting the restore, make sure that the PostgreSQL and Cluster configuration files are placed on all instances.
-
File system backups must be restored only of the same PostgreSQL instance version. Cross-version restores (upgrade or downgrade) are not supported.
-
The following configuration files must be retained in the data directory:
-
Master: pg_hba.conf, pg_ident.conf, postgresql.auto.conf, postgresql.conf
-
Standby: pg_hba.conf, pg_ident.conf, postgresql.auto.conf, postgresql.conf, standby.signal
-
-
An empty file named standby.signal must be present in the data directory of all standby server instances.
-
In the case of a redirect restore where the destination instance data directory path differs from the path recorded in the backup, ensure that the recovery.conf files are present in the new data directory path.
-
If using a cluster manager such as EnterpriseDB Failover Manager (EFM), repmgr, or Patroni, ensure that all associated cluster manager configuration files on both primary and standby instances are present and correctly configured.
-
The configuration files like postgresql.conf, pg_hba.conf, *pg_ident.conf, *postgresql.auto.conf (if it contains the connection information) should be present in the data directory of all the server instances. Additionally, the standby.signal file with primary_conninfo should always be present in the data directory of standby instance(s).
-
For all the nodes, the cluster configuration files like patroni.yaml, repmgr.yaml, efm.properties should be present at the path specified in destination instance properties. Also, the PostgreSQL server related configuration files like data_directory, config_directory etc. should be modified accordingly while performing redirect restore.
Procedure
-
From the CommCell Browser, navigate to client > PostgreSQL > PostgreSQL Cluster Client.
-
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.
-
In the General tab, do the following:
1. To restore objects to a different cluster client, from the Destination Client list, select the name of the cluster client.
2. To restore objects to a different cluster instance, from the Destination instance list, select the name of the cluster instance.
3. In the Number of Streams box, enter the number of streams to use in the restore operation.
/// note | Note The user can not set the stream(s) lesser than the number of client(s) available in the cluster. ///
4. Select the Recover Database Server checkbox. You can deselect the Recover Database Server checkbox 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.
-
In the Cluster restore options tab, do the following:
-
The Restore data to the entire cluster check box is selected by default.
Note
When Restore data to entire cluster is selected, the restore operation is performed at the cluster level and the data is restored as a cluster to all nodes. When this option is not selected, you must choose a specific cluster node as the restore target. In this case, PostgreSQL server is restored only to the selected node and is brought up as a standalone read-write server.
-
In the Cluster node box, select a cluster.
-
In the Client Name section, perform the following actions:
-
In the Server start command box, specify a command if any custom server start command needs to be used for a particular client.
-
In the Cluster manager start command box, specify a command if any custom cluster manager start command needs to be used for a particular client.
Note
This option will not be available for Native Replication cluster type.
-
If you change the data directory from the default path to a desired path, select the Redirect checkbox.
Note
If you select a new path, make sure that the configuration files which were available in the default path, are available in the new path.
-
-
-
Click OK.