GitLab备份迁移
banner 2021-03-16 gitlab
# 第一步:备份
查看是否存在备份:
ssh root@127.0.0.1
ls /var/opt/gitlab/backups
1
2
2
备份:
gitlab-rake gitlab:backup:create
1
# 第二步:安装相同版本的gitlab
下载地址:https://packages.gitlab.com/gitlab/gitlab-ce (opens new window)
下载:
wget https://packages.gitlab.com/gitlab/gitlab-ce/packages/el/7/gitlab-ce-13.6.1-ce.0.el7.x86_64.rpm
1
安装:
rpm -ivh gitlab-ce-13.6.1-ce.0.el7.x86_64.rpm
1
# 第三步:复制备份文件
scp /var/opt/gitlab/backups/1615840104_2021_03_16_13.6.1_gitlab_backup.tar root@127.0.0.2:/var/opt/gitlab/backups/
1
# 第四步:gitlab恢复
chmod 777 /var/opt/gitlab/backups/1615840104_2021_03_16_13.6.1_gitlab_backup.tar
gitlab-rake gitlab:backup:restore BACKUP=1615840104_2021_03_16_13.6.1
1
2
2