【Gerrit插件】Replication

2024-10-17  本文已影响0人  87d6dc4b11a7

要在 NoteDb 中复制帐户数据,必须复制 All-Users 存储库中的以下分支:

Replication 配置

启用 Replication

1、如果通过 SSH进行复制,请确保远程系统的主机密钥已经在 Gerrit 用户的~/.ssh/known_hosts文件中。添加主机密钥的最简单方法是用命令行手工连接一次。
2、创建 $site_path/etc/replication.config 配置文件,例如并行复制到四个不同的主机:

[remote "host-one"]
  url = gerrit2@host-one.example.com:/some/path/${name}.git

[remote "pubmirror"]
  url = mirror1.us.some.org:/pub/git/${name}.git
  url = mirror2.us.some.org:/pub/git/${name}.git
  url = mirror3.us.some.org:/pub/git/${name}.git
  push = +refs/heads/*:refs/heads/*
  push = +refs/tags/*:refs/tags/*
  threads = 3
  authGroup = Public Mirror Group
  authGroup = Second Public Mirror Group

3、重新加载 Replication 插件以获取新的配置

ssh -p 29418 localhost gerrit plugin reload replication

4、要手动触发 Replication,可以使用 replication start

ssh -p 29418 * replication start

参考链接:https://gerrit.wikimedia.org/r/plugins/replication/Documentation/config.md

上一篇 下一篇

猜你喜欢

热点阅读