gitlab常规维护命令
生活随笔
收集整理的這篇文章主要介紹了
gitlab常规维护命令
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
來源:http://blog.csdn.net/x6_9x/article/details/64929868
維護命令
查看狀態 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]# 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常规维护命令的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ThinkPHP跨控制器调用方法
- 下一篇: ELK平台的搭建