1、背景
公司使用的禅道一直是用docker进行部署较为方便,因业务需要迁移到另外一台服务器上。
2、在B服务器上安装同版本的禅道docker镜像
我使用的是16.3版本,去官网下载禅道16.3版本镜像并启动容器
[root@iZbp1879cepximf2cfld1uZ mysqldata]# docker pull easysoft/zentao:16.3
16.3: Pulling from easysoft/zentao
284055322776: Already exists
a0c0c66c5405: Pull complete
0ed9f43c329a: Pull complete
a9d80da3d5c7: Pull complete
da56439af8b5: Pull complete
8bfbe62dd6d0: Pull complete
484698922f05: Pull complete
a634885ab7a5: Pull complete
cbd9db393bbd: Pull complete
3b0f445dc1e2: Pull complete
63ec8514824b: Pull complete
3314e7525fe2: Pull complete
925e8da43e9c: Pull complete
3e9e7052eb4b: Pull complete
ee5fadc6c0cb: Pull complete
099396b46a17: Pull complete
9f672e985f36: Pull complete
185ef86d1d4e: Pull complete
6237c6e57a58: Pull complete
Digest: sha256:8c7a99e227589be8f3fbfaf4a6f341f62bce3c8b1a740e9170d0dac0aa6399b6
Status: Downloaded newer image for easysoft/zentao:16.3
docker.io/easysoft/zentao:16.3
[root@iZbp1879cepximf2cfld1uZ mysqldata]#
[root@iZbp1879cepximf2cfld1uZ mysqldata]# sudo docker run --name zentao -p 8080:80 -v /data/zentao/zentaopms:/www/zentaopms -v /data/zentao/mysqldata:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d easysoft/zentao:16.3
46c4fe7351ebda61ed9b7d85ff49d131e13ee6ac17b36139cf03fef4d10087ad
访问B服务器主机IP:8080端口进行初始化。
3、在A服务器上备份原禅道内容
4、把A服务器上原禅道备份的内容复制到B服务器的指定位置
/app/zentaopms/tmp/backup/202206220030250.sql.php
/app/zentaopms/tmp/backup/202206220030250.file.zip.php
/app/zentaopms/tmp/backup/202206220030250.code.zip.php
复制到B服务器的
/app/zentaopms/tmp/backup/202206220030250.sql.php
/app/zentaopms/tmp/backup/202206220030250.file.zip.php
/app/zentaopms/tmp/backup/202206220030250.code.zip.php