博客
关于我
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中的concat函数,concat_ws函数,concat_group函数之间的区别
查看>>
MySQL中的count函数
查看>>
MySQL中的DB、DBMS、SQL
查看>>
MySQL中的DECIMAL类型:MYSQL_TYPE_DECIMAL与MYSQL_TYPE_NEWDECIMAL详解
查看>>
MySQL中的GROUP_CONCAT()函数详解与实战应用
查看>>
MySQL中的IO问题分析与优化
查看>>
MySQL中的ON DUPLICATE KEY UPDATE详解与应用
查看>>
mysql中的rbs,SharePoint RBS:即使启用了RBS,内容数据库也在不断增长
查看>>
mysql中的undo log、redo log 、binlog大致概要
查看>>
Mysql中的using
查看>>
MySQL中的关键字深入比较:UNION vs UNION ALL
查看>>
mysql中的四大运算符种类汇总20多项,用了三天三夜来整理的,还不赶快收藏
查看>>
mysql中的字段如何选择合适的数据类型呢?
查看>>
MySQL中的字符集陷阱:为何避免使用UTF-8
查看>>
mysql中的数据导入与导出
查看>>
MySQL中的时间函数
查看>>
mysql中的约束
查看>>
MySQL中的表是什么?
查看>>
mysql中穿件函数时候delimiter的用法
查看>>
Mysql中索引的分类、增删改查与存储引擎对应关系
查看>>