旧gerrit服务器IP:192.168.56.101
新gerrit服务器IP:192.168.56.103
1:备份56.101服务器数据库:
pg_dump -h localhost -U postgres review_db > review_db.sql
2:复制review_db.sql到56.103服务器上
scp -r review_db.sql gerrit@192.168.56.103
3:在执行以下操作时,要暂停gerrit
4:复制56.101上面的Git到新的56.103上:
scp -r /home/gerrit/review_site/git/* gerrit@192.168.56.103:/home/gerrit/review_site/git/
5:复制56.101上的password到56.103上
scp /etc/apache2/passwords ubuntu@192.168.56.103:/etc/apache2
6:执行安装命令:
java -jar gerrit.war init -d gerrit_sites
7:重启gerrit