Replication Commands – cli


Replication commands

Queries for replication management using cli

BangDB works in three different ways

1. Embedded - BangDB is part of application process. On server or device 2. Server - BangDB runs as a service and clients connect to it. User applications use client libs. This is Master - Slave model 3. Distributed - BangDB runs as a p2p based cluster. There is no master or slave, and entire cluster is part of virtual network overlay
Replication in this context is for option 2, when server runs in master slave model.

There is always a single master and there could be one or more slaves attached to it. All the writes (from clients) will happen on master and it will sync data with slaves

Replication to the slaves happen in sync /async fashion based on setting and the replica (slaves) can be added at run time without bringing the master to halt and all operations on the server can continue while initial sync and replication is in progress

Below are the list of all supported commands for replication on cli
server repl state change command ______________________________________ register master where server = ip:port register slave where server = ip:port and master = ip:port show servertype show servertype where server = ip:port

Make a server running at ip:port as master

bangdb> register master where server =

Make a server running at ip:port as slave to a master running at some other ip:port

bangdb> register slave where server = and master =

See the type of the server [ Master or Salve ]

bangdb> show servertype Or bangdb> show servertype where server =