rladmin failover

Fail over primary shards of a database to their replicas.

Fails over one or more primary (also known as master) shards of a database and promotes their respective replicas to primary shards.

rladmin failover
        [db { db:<id> | <name> }]
        shard <id1 ... idN>
        [immediate]

Parameters

Parameter Type/Value Description
db db:<id>
name
Fail over shards for the specified database
shard one or more primary shard IDs Primary shard or shards to fail over
immediate Perform failover without verifying the replica shards are in full sync with the master shards

Returns

Returns Finished successfully if the failover completed. Otherwise, it returns an error.

Use rladmin status shards to verify that the failover completed.

Example

$ rladmin status shards
SHARDS:
DB:ID  NAME        ID         NODE     ROLE     SLOTS     USED_MEMORY    STATUS
db:5   tr01        redis:12   node:1   slave    0-16383   3.02MB         OK     
db:5   tr01        redis:13   node:2   master   0-16383   3.09MB         OK     
$ rladmin failover shard 13
Executing shard fail-over: OOO.
Finished successfully
$ rladmin status shards
SHARDS:
DB:ID  NAME        ID         NODE     ROLE     SLOTS     USED_MEMORY    STATUS
db:5   tr01        redis:12   node:1   master   0-16383   3.12MB         OK     
db:5   tr01        redis:13   node:2   slave    0-16383   2.99MB         OK
RATE THIS PAGE
Back to top ↑