美文网首页
【Gerrit插件】Replication

【Gerrit插件】Replication

作者: 87d6dc4b11a7 | 来源:发表于2024-10-17 08:52 被阅读0次

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

  • refs /users/* (用户分支)
  • refs/meta/external-ids(外部 id)
  • refs/starred-changes/*(star labels,Gerrit副本不需要)
  • refs/sequences/accounts(账户序列号,Gerrit副本不需要)

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

相关文章

网友评论

      本文标题:【Gerrit插件】Replication

      本文链接:https://www.haomeiwen.com/subject/itdghjtx.html