当前位置:   article > 正文

harbor升级 从1.10.2升级到2.2.2_harbor安装pgupgrade版本问题

harbor安装pgupgrade版本问题

一、关停harbor服务

cd /data/harbor_install_1.10.2
docker-compose down   关停harbor
  • 1
  • 2

二、上传获取harbor_v2.2.2包

https://github.com/goharbor/harbor/releases/tag/v2.2.2   下载包,并上传到服务器

mkdir /data/harbor_install_2.2.2 -p
cd   /data/harbor_install_2.2.2

#安装包已上传到目录中/data/harbor_install_2.2.2
tar zxvf harbor-offline-installer-v2.2.2.tgz
cd harbor
docker load -i harbor.v2.2.2.tar.gz
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

二、备份数据

cd /data
mkdir harbor_bak
mv /data/harbor/registry  /data/harbor_bak/
cp -rf /data/harbor/* /data/harbor_bak/
  • 1
  • 2
  • 3
  • 4

三、迁移配置文件

docker run -it --rm -v /:/hostfs goharbor/prepare:v2.2.2 migrate -i /data/harbor_install_1.10.2/harbor/harbor.yml -o /data/harbor_install_2.2.2/harbor.yml 

migrating to version 2.0.0
migrating to version 2.1.0
migrating to version 2.2.0
Written new values to /data/harbor_install_2.2.2/harbor.yml
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

四、启动新的harbor

cd /data/harbor_install_2.2.2/
./install.sh  --with-chartmuseum --with-trivy

Creating network "harbor_install_222_harbor" with the default driver
Creating network "harbor_install_222_harbor-chartmuseum" with the default driver
Creating harbor-log ... done
Creating harbor-portal ... done
Creating redis         ... done
Creating chartmuseum   ... done
Creating registry      ... done
Creating registryctl   ... done
Creating harbor-db     ... done
Creating harbor-core   ... done
Creating trivy-adapter ... done
Creating nginx             ... done
Creating harbor-jobservice ... done
✔ ----Harbor has been installed and started successfully.----
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17

五、把旧的registry 迁回

cd /data/harbor_install_2.2.2/

#关停新的harbor
docker-compose down 

#把registry迁回
mv /data/harbor_bak/registry  /data/harbor

#启动harbor
cd /data/harbor_install_2.2.2/
docker-compose up -d
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11

六、验证

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/977436
推荐阅读
相关标签
  

闽ICP备14008679号