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

你可能感兴趣的文章
mysql5.7.19安装图解_mysql5.7.19 winx64解压缩版安装配置教程
查看>>
MySQL5.7.37windows解压版的安装使用
查看>>
mysql5.7免费下载地址
查看>>
mysql5.7命令总结
查看>>
mysql5.7安装
查看>>
mysql5.7性能调优my.ini
查看>>
MySQL5.7新增Performance Schema表
查看>>
Mysql5.7深入学习 1.MySQL 5.7 中的新增功能
查看>>
Webpack 之 basic chunk graph
查看>>
Mysql5.7版本单机版my.cnf配置文件
查看>>
mysql5.7的安装和Navicat的安装
查看>>
mysql5.7示例数据库_Linux MySQL5.7多实例数据库配置
查看>>
Mysql8 数据库安装及主从配置 | Spring Cloud 2
查看>>
mysql8 配置文件配置group 问题 sql语句group不能使用报错解决 mysql8.X版本的my.cnf配置文件 my.cnf文件 能够使用的my.cnf配置文件
查看>>
MySQL8.0.29启动报错Different lower_case_table_names settings for server (‘0‘) and data dictionary (‘1‘)
查看>>
MYSQL8.0以上忘记root密码
查看>>
Mysql8.0以上重置初始密码的方法
查看>>
mysql8.0新特性-自增变量的持久化
查看>>
Mysql8.0注意url变更写法
查看>>
Mysql8.0的特性
查看>>