FSBasedBackupSet Cluster to Cluster Restore (In-place)

For Cluster to cluster restore, you need to perform the browse from FSBased backupset level. You can select in-place or out-of-place option as per your need.

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 is set to on in the postgresql.conf file or that the data checksums are enabled during cluster initialization in order for pg_rewind to run successfully. For more details, see pg_rewind.

Before We Begin

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

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 Current Location

    The Cluster restore options dialog box appears.

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

  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.

Page contents

×

Loading...