Viewing the HA database replication status using the CLI

Prev Next

Use the commands in this section to view the HA database replication status.

This procedure shows status information for both HA primary and secondary nodes during replication streaming, database failover, and database sync progress.

To view the replication status:
  1. Log in to the primary node.

  2. Enable the CLI enable mode:

    node-hostname > enable
  3. View the status:

    node-hostname # show ha data replication status

For a description of the replication states, see Viewing the cluster status .

Examples

The following example shows the status of the HA database replication services when the HA primary node is running a full database sync with the HA secondary node. You view the database sync progress through the event history.

node1# show ha replication data status

Database Replication Status:
Primary:    node1 (self) (fedb running)
Secondary:  node2        (fedb stopped)

Now:        2019/06/14 21:57:31


Streaming replication
 Latest status:       replication information unavailable 
 Last updated time:   2019/06/14 21:23:32.045 (33 min 59 sec ago)

Base database sync 
 Status:              in progress
 Latest status:       running full db sync with secondary for 1743 sec at marker 000154B1
 Last updated time:   2019/06/14 21:23:32.045 (33 min 59 sec ago)
 
 Event history
   Duration  29 min  4.904 sec  (on-going event) 
    2019/06/14 21:28:18.998  node2  secondary  initializing full db sync
    2019/06/14 21:57:23.902  node1  primary    running full db sync with secondary for 1743 sec at marker 000154B1

Database fail-over
 Latest status:       node1 was promoted to new master
 Last updated time:   2019/06/14 21:23:12.380 (34 min 18 sec ago)

 Event history

 1   2019/06/14 21:23:12.380  node1  secondary  fedb          qa-cm7500-4-9-12 was promoted to new master
 2   2019/06/14 21:17:16.808  node2  secondary  fedb          qa-cm7500-4-9-10 was promoted to new master
 3   2019/06/14 21:08:31.089  node2  secondary  fedb          qa-cm7500-4-9-10 was promoted to new master
 4   2019/06/14 21:03:48.307  node2  secondary  fedb          qa-cm7500-4-9-10 was promoted to new master

Most recent events

 1   2019/06/14 21:57:23.902  node1  primary    full-db-sync  running full db sync with secondary for 1743 sec at marker 000154B1
 2   2019/06/14 21:57:07.498  node2  secondary  full-db-sync  full db sync in progress 78% completed
 3   2019/06/14 21:56:52.570  node1  primary    full-db-sync  running full db sync with secondary for 1711 sec at marker 000154B1
 4   2019/06/14 21:56:52.570  node1  primary    full-db-sync  running full db sync with secondary for 1711 sec at marker 000154B1
 5   2019/06/14 21:56:37.474  node2  secondary  full-db-sync  full db sync in progress 77% completed
 . . .