Gitlab服务器维护
一. 内容
- Gitlab服务器的更新
- Gitlab服务器备份与恢复
- 导入Git仓库
二. Gitlab服务器的更新
1. 使用SSH登陆Gitlab服务器
2. 停止后端的unicorn服务器
[root@c720141 ~]# gitlab-ctl stop unicorn
ok: down: unicorn: 0s, normally up
3. 停止后端的job 服务器。
[root@c720141 ~]# gitlab-ctl stop sidekiq
ok: down: sidekiq: 0s, normally up
4. 升级前先做好备份,防止升级失败好回滚。
[root@c720141 ~]# gitlab-rake gitlab:backup:create
Dumping database ...
Dumping PostgreSQL database gitlabhq_production ... [DONE]
done
Dumping repositories ...
* root/super-git ... [DONE]
* root/super-git.wiki ... [DONE]
done
Dumping uploads ...
done
Dumping builds ...
done
Dumping artifacts ...
done
Dumping pages ...
done
Dumping lfs objects ...
done
Dumping container registry images ...
[DISABLED]
Creating backup archive: 1529996730_2018_06_26_11.0.1_gitlab_backup.tar ... done
Uploading backup archive to remote storage ... skipped
Deleting tmp directories ... done
done
done
done
done
done
done
done
Deleting old backups ... skipping
5. 从该地址下载最新包。
6. 按介绍过的安装步骤正常安装就可以了。
三. Gitlab服务器备份与恢复
1. 备份
(1). 在/etc/gitlab/gitlab.rb中描述了备份位置。详细信息见如下 :

把上面的备份相关配置注释给去掉,去根据情况更改适合自己的位置。
(2). 修改完成后,执行以下命令让服务器生效。
gitlab-ctl reconfigure
(3). 执行备份命令:
gitlab-rake gitlab:backup:create
(4)自动备份(通过linux自带的crontab进行自动备份)
crontabe -e

2. 还原
(1)停止相关的服务
[root@c720141 ~]# gitlab-ctl stop unicorn
ok: down: unicorn: 0s, normally up
[root@c720141 ~]# gitlab-ctl stop sidekiq
ok: down: sidekiq: 0s, normally up
(2)执行还原
[root@c720141 backups]# gitlab-rake gitlab:backup:restore BACKUP=/var/opt/gitlab/backups/1530000374_2018_06_26_11.0.1
(3)启动gitlab服务器
[root@c720141 backups]#gitlab-ctl start
三. 导入已经存在的库
1. 登陆GitLab服务器
2. 点击【New Project】

3. 根据需要,在下面红色框中填入适当信息。

4. 导入情况如下所示


Gitlab服务器维护的更多相关文章
- 英雄联盟网络测速 v1.3 全服全区取延时+取服务器维护状态+机房地理位置
全服全区取延时+取服务器维护状态+机房地理位置 v1.2修复了服务器状态获取不准确的bug 下载链接: https://pan.baidu.com/s/1c1LHIY8
- 搭建 Linux 下 GitLab 服务器
转自:http://blog.csdn.net/passion_wu128/article/details/8216086 目录: 平台需求 硬件需求 本安装指南已于 DebianUbuntu 测试通 ...
- 搭建 Linux 下 GitLab 服务器(转)
这两天因为项目需求需要搭建一个GitLab服务器,遇到了很多问题,参考了很多网络资料,终于搭建成功,在此把这个过程记录一下,利人利己. 一.最终目的 1,在Linux下创建GitLab服务器,客户端能 ...
- gitlab服务器搭建教程
gitlab服务器搭建教程 ----2016年终总结 三 参考https://bbs.gitlab.cc/topic/35/gitlab-ce-8-7-%E6%BA%90%E7%A0%81%E5%AE ...
- Ubuntu搭建Gitlab服务器
想到Gitlab就必定会想到SVN,因为两者都是代码管理系统,作为开发人员来说,用习惯了SVN的图形化界面和SVN代码更新和提交的方式, 可能就会觉得使用git会比较麻烦,其实不然git使用起来非常方 ...
- 基于docer搭建私有gitlab服务器
今天闲着无聊,于是乎想用最近很流行的docker容器搭建一个自己的gitlab的服务器,关于docker和gitlab就不多介绍了,网上查了很多资料,貌似没有一个统一的方法,很乱很杂,而且很容易误导人 ...
- 在Windows下搭建Gitlab服务器
一.GitLab简介 GitLab 是一个用于仓库管理系统的开源项目.使用Git作为代码管理工具,并在此基础上搭建起来的web服务. 可通过Web界面进行访问公开的或者私人项目.它拥有与Github类 ...
- [转]Centos 7搭建Gitlab服务器超详细
本文转自:https://blog.csdn.net/duyusean/article/details/80011540 可参考:https://about.gitlab.com/install/#c ...
- [转]Centos 7 安装部署 GitLab 服务器
Centos 7 安装部署 GitLab 服务器 转自:https://www.jianshu.com/p/79bfded68899 文前说明 作为码农中的一员,需要不断的学习,我工作之余将一些分析总 ...
随机推荐
- BFS:八数码问题
#include <iostream> #include <cstdlib> #include <cstdio> #include <cstring> ...
- 监控redis数据库应用状态:python,tornado实现
公司里最近redis服务器压力越来越大,其大概情况,只能从操作系统层面看,并不详尽,故同事在网上找了一个叫做 redis-live的开源项目,我配合部署了一下,还真有点意思,并解决了其中部分小debu ...
- Web Api问题汇总
在公网上布署Web Api的时候,不能调用,返回404 在web.config中 Adding the following to the web.config file worked for me: ...
- 【Linux】SecureCRT连接Linux乱码
SecureCRT连接linux出现乱码问题.解决方法. 打开SecureCRT-->option-->Session option
- kdissert:linux下的自由脑图软件
----------------------------------------------------作者: 吉庆 email: jiqingwu@gmail.commainpage: http ...
- log4net记录系统错误日志到文本文件用法详解
log4net是一个完全免费开源的插件,可以去官网下载源码. 一般系统操作日志不会用log4net,自己写代码存入数据库更方便合理,但是系统部署后运行在客户环境,难免会发生系统bug.崩溃.断网等无法 ...
- opencv 摄像头
VideoCapture cap(); if(!cap.isOpened()) ; Mat frame, edges; namedWindow(); for(;;) { cap >> fr ...
- 2016.6.17——Remove Duplicates from Sorted Array
Remove Duplicates from Sorted Array 本题收获: 1.“删除”数组中元素 2.数组输出 题目: Given a sorted array, remove the du ...
- shell脚本编程之“最简单的死循环”【转】
转自:http://blog.chinaunix.net/uid-23046336-id-3475462.html 在linux下编程的程序猿都知道shell脚本,就算你不怎么熟悉,也应该听过的吧!那 ...
- 2018ICPC南京网络赛
2018ICPC南京网络赛 A. An Olympian Math Problem 题目描述:求\(\sum_{i=1}^{n} i\times i! \%n\) solution \[(n-1) \ ...