gitlab上传文件到group_gitlab恢复备份数据

本文详细介绍了如何在新服务器上恢复旧服务器备份的 GitLab 数据。关键步骤包括:确保新服务器安装与备份时相同版本的 GitLab (v11.5.1-ee),执行恢复命令 `gitlab-rake gitlab:backup:restore`,以及重启 GitLab 服务。备份和恢复过程中需谨慎操作,确保数据完整性和服务稳定性。
摘要由CSDN通过智能技术生成

在新服务器上恢复其他服务器上备份的gitlab数据

需要注意的是新服务器的gitlab的版本和源服务器上的gitlab版本必须一致的,获取版本的命令

#gitlab-rake gitlab:env:infoSystem informationSystem:CentOS 7.6.1810Proxy:noCurrent User:gitUsing RVM:noRuby Version:2.4.5p335Gem Version:2.7.6Bundler Version:1.16.6Rake Version:12.3.1Redis Version:3.2.12Git Version:2.18.1Sidekiq Version:5.2.1Go Version:unknownGitLab informationVersion:11.5.1-eeRevision:cab68f5Directory:/opt/gitlab/embedded/service/gitlab-railsDB Adapter:postgresqlDB Version:9.6.8URL:http://gitlab.xiaomawang.comHTTP Clone URL:http://gitlab.xiaomawang.com/some-group/some-project.gitSSH Clone URL:git@gitlab.xiaomawang.com:some-group/some-project.gitElasticsearch:noGeo:noUsing LDAP:yesUsing Omniauth:yesOmniauth Providers: GitLab ShellVersion:8.4.1Repository storage paths:- default: /data1/gitlab/git-data/repositoriesHooks:/opt/gitlab/embedded/service/gitlab-shell/hooksGit:/opt/gitlab/embedded/bin/git这里的版本是Version:11.5.1-ee

那么新服务器上需要安装Version:11.5.1-ee这个版本的gitlab服务

#yum install gitlab-ee-11.5.1#gitlab-ctl reconfigure#gitlab-ctl restart启动服务即可下边执行恢复的动作#gitlab-ctl stop unicorn#gitlab-ctl stop sidekiq备份文件的名字(1589317383_2020_05_13_11.5.1-ee_gitlab_backup.tar)执行恢复的命令#gitlab-rake gitlab:backup:restore BACKUP=1589317383_2020_05_13_11.5.1-ee之后重启gitlab服务就可以了 #gitlab-ctl restart

附加备份的脚本

#!/bin/bash/usr/bin/gitlab-rake gitlab:backup:create CRON=1
f5e2447e2b9e3a2045246f0fd788a9b4.png
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值