现在从ttactive duplicate到 ttstandby,即从Active duplicate到Standby
[ttstandby@west-mountain info]$ ttrepadmin -duplicate -from ttactive -host “west-mountain” -setMasterRepStart -uid test -pwd test -remoteDaemonPort 17100 -keepCG -cacheUid test -cachePwd test -localhost “west-mountain” ttstandby
Enter password for ‘test’:
Duplicate完成之后,连接ttstandby,并通过下列命令检查一下
ttisql ttstandby
Command> cachegroups;
Command> repschemes;
Command> select * from student;
Command> select * from student_course;
启动备节点上的Replication Agent,等待并确认其进入”StandBy”状态
Command> call ttrepstart;
Command> call ttRepStateGet;
< STANDBY >
1 row found.
Command>
启动ttstandby 上的 Cache Agent
Command> call ttcachestart;
Command>
至此,Standby节点配置完成。
从ttstandby duplicate到ttdisaster,即从备用节点duplicate到所有的subscriber,即目前的灾备中心
注意,此时和从ttactive duplicate到ttstandby不一样,参数为- initCacheDR
[ttdisaster@west-mountain ~]$ ttRepAdmin -duplicate -from ttstandby -host “west-mountain” -initCacheDR -uid test -pwd test -remoteDaemonPort 17200 -cacheUid test -cachePwd test ttdisaster
Enter password for ‘test’:
[ttdisaster@west-mountain ~]$
连接到ttdisaster,做进一步的确认
[ttdisaster@west-mountain ~]$ ttisql ttdisaster
Command> cachegroups;1 cache groups found.
Command> repschemes;
Command> select * from student;
Command> select * from student_course;
为ttdisaster启动Replication Agent
Command> call ttrepstart;
Command>
至此,整个Active-StandBy Pair,外加Cache Group、灾备中心都已经建立完成。