美文网首页
Gitlab 常用指令

Gitlab 常用指令

作者: 活这么大就没饱过 | 来源:发表于2017-08-03 14:03 被阅读127次

Gitlab 常用指令

1. 启动及停止

# 启动Gitlab所有组件
sudo gitlab-ctl start

# 停止Gitlab所有组件
sudo gitlab-ctl stop

# 重启Gitlab所有组件
sudo gitlab-ctl restart

2. 查看状态

# 查看状态
sudo gitlab-ctl status

3. 备份

备份配置

配置文件在路径/etc/gitlab/中,将所有的配置用tar指令备份即可

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

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

[root@localhost ~]# sudo gitlab-rake gitlab:backup:create
Dumping database ... 
Dumping PostgreSQL database gitlabhq_production ... [DONE]
done
Dumping repositories ...
 * root/test1 ... [DONE]
 * root/test1.wiki ...  [SKIPPED]
done
Dumping uploads ... 
done
Dumping builds ... 
done
Dumping artifacts ... 
done
Dumping pages ... 
done
Dumping lfs objects ... 
done
Dumping container registry images ... 
[DISABLED]
Creating backup archive: 1490183942_2017_03_22_gitlab_backup.tar ... done
Uploading backup archive to remote storage  ... skipped
Deleting tmp directories ... done
done
done
done
done
done
done
done
Deleting 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.cfg
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       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

相关文章

  • Gitlab 常用指令

    Gitlab 常用指令 1. 启动及停止 2. 查看状态 3. 备份 备份配置 配置文件在路径/etc/gitla...

  • gitlab 备份和还原

    备份说明: gitlab备份分为配置备份和数据备份 执行指令-数据备份 gitlab-backup create ...

  • gitlab忘记密码

    1.进入到gitlab 的ssh命令行 2.登录到Gitlab服务器 如果执行上面的指令提示 则可能是Gitlab...

  • docker

    1. docker安装gitlab docker安装gitlab 2. docker 常用命令总结

  • ARM 64 常见汇编指令

    ARM64常用的汇编指令 运算指令 程序跳转指令

  • win10下hyper-v+centos7+gitlab+asp

    GitLab常用命令 sudo gitlab-ctl reconfigure #重新加载配置,每次修改/etc/g...

  • tmux

    安装 常用指令 常用快捷键

  • Vue.js第二天

    指令 1.什么是指令? 2.vue中常用的指令

  • LLDB 学习

    常用LLDB 指令 指令格式 [ [ ...] ] [- options [option-value]] [...

  • git使用率最高的指令

    git常用指令

网友评论

      本文标题:Gitlab 常用指令

      本文链接:https://www.haomeiwen.com/subject/iilplxtx.html