博客
关于我
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 默认事务隔离级别下锁分析
查看>>
Mysql--逻辑架构
查看>>
MySql-2019-4-21-复习
查看>>
mysql-5.7.18安装
查看>>
MySQL-Buffer的应用
查看>>
mysql-cluster 安装篇(1)---简介
查看>>
mysql-connector-java各种版本下载地址
查看>>
mysql-EXPLAIN
查看>>
mysql-group_concat
查看>>
MySQL-redo日志
查看>>
MySQL-【1】配置
查看>>
MySQL-【4】基本操作
查看>>
Mysql-丢失更新
查看>>
Mysql-事务阻塞
查看>>
Mysql-存储引擎
查看>>
mysql-开启慢查询&所有操作记录日志
查看>>
MySQL-数据目录
查看>>
MySQL-数据页的结构
查看>>
MySQL-架构篇
查看>>
MySQL-索引的分类(聚簇索引、二级索引、联合索引)
查看>>