Performing a PostgreSQL Replication Operation

Updated

After you configure the replication feature, the Commvault software runs a full backup operation, or uses the most recent backup to automatically copy the data from the master server to the standby server, so that the servers are synchronized.

You can schedule archive log file backup operations on the master server based on how frequently you want the destination to be synchronized with the source. The software uses log restores to synchronize the standby server with the master server.

If no new backups have run since the last replication operation, then the scheduled replication operation does not run.

Before You Begin

  • Install the PostgreSQL Agent on the Windows or the UNIX standby host. For more information, see Deployment - PostgreSQL Agent.

  • Add a PostgreSQL instance on the destination client.

    Notes

    • On the master server, set wal_level = hot_standby in the postgresql.conf file.

    • On the Windows standby host, set hot_standby = on in the postgresql.conf file.

  • If you plan to use a storage policy copy, or secondary media, verify that the copy precedence exists for both the data files and the log files, and that there is a scheduled auxiliary copy job.

Procedure

  1. From the CommCell Browser, expand Client Computers > client > PostgreSQL > instance.

  2. Right-click the FSBasedBackupSet, point to All Tasks, Live Sync, and then Configuration.

    The PostgreSQL Live Sync Options dialog box appears.

  3. On the General tab, select the replication options:

    1. From the Destination Client list, select a client where the software replicates the data.

    2. From the Destination Instance list, select an instance where the software replicates the data.

    3. In the Baseline for Sync pane, select one of the following methods to back up data:

      • To use the latest full backup, select Use most recent full backup.

      • To run a new backup for the replication operation, select Run a new full backup.

  4. Optional: Complete the following steps to restore from a storage policy copy.

    1. Click Advanced.

      The PostgreSQL Live Sync Advanced Options dialog box appears.

    2. On the Copy Precedence tab, select the following options:

      1. Select the Restore from copy precedence check box.

      2. In the Copy Precedence box, select the number of the backup copy.

    3. Click OK.

    Note: When you specify a copy precedence, the software replicates changes only when the source server backup is available on the secondary media or on the secondary copy. The backup is available on the media after the auxiliary job completes, so that is when the software attempts the replication.

  5. Click OK.

Result

  • After you configure the replication operation, a backup operation starts on the master server. This backup is based on the options that you selected when you configured the replication operation.

  • After the backup operation completes, a baseline restore job runs and the replication standby server opens in read-only mode.

  • After the sync is established, at the end of each log file backup operation on the master server, a replication schedule runs a log restore operation on the standby server.

  • Standby server will be up and running with data directory path same as that of the master server.

Was this page helpful?