# FSBasedBackupSet Cluster to Cluster Restore (Out-of-place)

You can perform FSBasedBackupSet out-of-place cluster to cluster restore.

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.

- 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.

## Prerequisites

If you use a custom socket directory, specify the port using the format: SOCKET_DIR_PATH:PORT. You may list multiple socket directories separated by commas before the colon.

For example:

Single directory: /var/run/postgresql:5432

Multiple directories: /var/run/postgresql,/tmp,/etc/pgsql:5432

### Procedure

1. From the Command Center navigation pane, go to Protect > Databases.

   The database Overview page appears.

2. Go to the Instances tab and click the instance that you want to restore.

   The instance Overview page appears.

3. In the Recovery points calendar tile, select FSBasedBackupSet.

4. Select a date from the calendar, and then click Restore.

   The Backup content page appears.

   Note

   Ensure that you have performed a successful backup on the selected date.

5. Select the database(s) and click Restore.

   The Restore options dialog box appears.

6. Click Cluster Restore Options. For more information, see Restoring to the different Location.

   The Cluster restore options dialog box appears.

7. The Restore data to the entire cluster check box is selected by default.

8. Select Cleanup old directories check box to stop the running cluster and cleanup data/archive log/tablespace directories from the destination clients.

9. In the Cluster node section, enter the following details:

   1. In the Server start command box, specify a command if any custom server start command needs to be used for a particular client.

   2. 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.

   3. Select the Redirect checkbox to specify the redirect path if you want to restore the data to a non-default path.

      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. For example, the configuration files 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/recovery.conf file with primary_conninfo should always be present in the data directory of standby instance(s).

10. Click Save.

×

Loading...