9.3. 使用命令行演示副本
您可以降级:
- 消费者的供应商或 hub
- 到消费者的 hub
本节论述了如何降级 dc=example,dc=com
后缀的副本。
先决条件
- 目录服务器实例是复制拓扑的成员。
- 要降级的副本是供应商或 hub。
流程
如果副本降级有不再需要的复制协议,例如,因为您将副本降级为消费者,请删除复制协议:
列出副本上的复制协议:
dsconf <instance_name> repl-agmt list --suffix "dc=example,dc=com"
# dsconf <instance_name> repl-agmt list --suffix "dc=example,dc=com" dn: cn=example-agreement,cn=replica,cn=dc\3Dexample\2Cdc\3Dcom,cn=mapping tree,cn=config cn: example-agreement ...
Copy to Clipboard Copied! Toggle word wrap Toggle overflow cn
属性包含您在下一步中所需的复制协议名称。从副本中删除复制协议:
dsconf <instance_name> repl-agmt delete --suffix "dc=example,dc=com" example-agreement
# dsconf <instance_name> repl-agmt delete --suffix "dc=example,dc=com" example-agreement
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
降级实例:
dsconf <instance_name> replication demote --suffix "dc=example,dc=com" --newrole "hub_or_consumer"
# dsconf <instance_name> replication demote --suffix "dc=example,dc=com" --newrole "hub_or_consumer"
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 根据您要配置的角色,将--
newrole
参数设置为hub
或consumer
。- 如果您将副本配置为 hub,并且它应该向拓扑中的其他主机发送更新,请创建复制协议。