博客
关于我
gitlab常规维护命令
阅读量:236 次
发布时间:2019-03-01

本文共 1988 字,大约阅读时间需要 6 分钟。

维护命令

查看状态sudo gitlab-ctl status

启停

# 启动Gitlab所有组件sudo gitlab-ctl start# 停止Gitlab所有组件sudo gitlab-ctl stop# 重启Gitlab所有组件sudo gitlab-ctl restart

备份

备份配置

配置文件再/etc/gitlab/ 下面,将所有的配置用tar备份即可

[root@localhost init.d]# cd /etc/gitlab/[root@localhost gitlab]# lsgitlab.rb  gitlab-secrets.json  trusted-certs

备份data (以包安装的方式)

[root@localhost ~]# sudo gitlab-rake gitlab:backup:createDumping database ... Dumping PostgreSQL database gitlabhq_production ... [DONE]doneDumping repositories ... * root/test1 ... [DONE] * root/test1.wiki ...  [SKIPPED]doneDumping uploads ... doneDumping builds ... doneDumping artifacts ... doneDumping pages ... doneDumping lfs objects ... doneDumping container registry images ... [DISABLED]Creating backup archive: 1490183942_2017_03_22_gitlab_backup.tar ... doneUploading backup archive to remote storage  ... skippedDeleting tmp directories ... donedonedonedonedonedonedonedoneDeleting old backups ... skipping[root@localhost ~]# ls -lrt总用量 288-rw-r--r--. 1 root root  279608 11月 14 2014 rlwrap-0.42.tar.gz-rw-------. 1 root root    1886 1月  17 2016 initial-setup-ks.cfg-rw-------. 1 root root    1608 1月  18 2016 anaconda-ks.cfgdrwxr-xr-x. 2 root root       6 1月  30 2016 桌面drwxr-xr-x. 2 root root       6 1月  30 2016 下载drwxr-xr-x. 2 root root       6 1月  30 2016 模板drwxr-xr-x. 2 root root       6 1月  30 2016 音乐drwxr-xr-x. 2 root root       6 1月  30 2016 文档drwxr-xr-x. 2 root root       6 1月  30 2016 图片drwxr-xr-x. 2 root root       6 1月  30 2016 视频drwxr-xr-x. 2 root root      34 9月  23 15:21 公共drwxr-xr-x. 8 yang users   4096 9月  23 16:12 rlwrap-0.42[root@localhost ~]# find / -name "1490183942_2017_03_22_gitlab_backup.tar"find: ‘/proc/23513’: 没有那个文件或目录/var/opt/gitlab/backups/1490183942_2017_03_22_gitlab_backup.tar

恢复数据 (针对以包安装的方式)

[root@localhost ~]# sudo gitlab-ctl stop unicorn[root@localhost ~]# sudo gitlab-ctl stop sidekiq[root@localhost ~]# sudo gitlab-ctl status[root@localhost ~]# sudo gitlab-rake gitlab:backup:restore BACKUP=1490183942_2017_03_22

转载地址:http://pmgv.baihongyu.com/

你可能感兴趣的文章
mysqldump的一些用法
查看>>
mysqli
查看>>
MySQLIntegrityConstraintViolationException异常处理
查看>>
mysqlreport分析工具详解
查看>>
MySQLSyntaxErrorException: Unknown error 1146和SQLSyntaxErrorException: Unknown error 1146
查看>>
Mysql_Postgresql中_geometry数据操作_st_astext_GeomFromEWKT函数_在java中转换geometry的16进制数据---PostgreSQL工作笔记007
查看>>
mysql_real_connect 参数注意
查看>>
mysql_secure_installation初始化数据库报Access denied
查看>>
MySQL_西安11月销售昨日未上架的产品_20161212
查看>>
Mysql——深入浅出InnoDB底层原理
查看>>
MySQL“被动”性能优化汇总
查看>>
MySQL、HBase 和 Elasticsearch:特点与区别详解
查看>>
MySQL、Redis高频面试题汇总
查看>>
MYSQL、SQL Server、Oracle数据库排序空值null问题及其解决办法
查看>>
mysql一个字段为空时使用另一个字段排序
查看>>
MySQL一个表A中多个字段关联了表B的ID,如何关联查询?
查看>>
MYSQL一直显示正在启动
查看>>
MySQL一站到底!华为首发MySQL进阶宝典,基础+优化+源码+架构+实战五飞
查看>>
MySQL万字总结!超详细!
查看>>
Mysql下载以及安装(新手入门,超详细)
查看>>