日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

gitlab常规维护命令

發布時間:2024/9/20 编程问答 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 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 1114 2014 rlwrap-0.42.tar.gz -rw-------. 1 root root 1886 117 2016 initial-setup-ks.cfg -rw-------. 1 root root 1608 118 2016 anaconda-ks.cfg drwxr-xr-x. 2 root root 6 130 2016 桌面 drwxr-xr-x. 2 root root 6 130 2016 下載 drwxr-xr-x. 2 root root 6 130 2016 模板 drwxr-xr-x. 2 root root 6 130 2016 音樂 drwxr-xr-x. 2 root root 6 130 2016 文檔 drwxr-xr-x. 2 root root 6 130 2016 圖片 drwxr-xr-x. 2 root root 6 130 2016 視頻 drwxr-xr-x. 2 root root 34 923 15:21 公共 drwxr-xr-x. 8 yang users 4096 923 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常规维护命令的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。