博客
关于我
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/

你可能感兴趣的文章
MySQL一个表A中多个字段关联了表B的ID,如何关联查询?
查看>>
MYSQL一直显示正在启动
查看>>
MySQL一站到底!华为首发MySQL进阶宝典,基础+优化+源码+架构+实战五飞
查看>>
MySQL万字总结!超详细!
查看>>
Mysql下载以及安装(新手入门,超详细)
查看>>
MySQL不会性能调优?看看这份清华架构师编写的MySQL性能优化手册吧
查看>>
MySQL不同字符集及排序规则详解:业务场景下的最佳选
查看>>
Mysql不同官方版本对比
查看>>
MySQL与Informix数据库中的同义表创建:深入解析与比较
查看>>
mysql与mem_细说 MySQL 之 MEM_ROOT
查看>>
MySQL与Oracle的数据迁移注意事项,另附转换工具链接
查看>>
mysql丢失更新问题
查看>>
MySQL两千万数据优化&迁移
查看>>
MySql中 delimiter 详解
查看>>
MYSQL中 find_in_set() 函数用法详解
查看>>
MySQL中auto_increment有什么作用?(IT枫斗者)
查看>>
MySQL中B+Tree索引原理
查看>>
mysql中cast() 和convert()的用法讲解
查看>>
mysql中datetime与timestamp类型有什么区别
查看>>
MySQL中DQL语言的执行顺序
查看>>