GitLab CE伺服器安裝配置備份恢復升級注意項總結
GitLab CE安裝
安裝比較簡單,rpm直接在不同平臺安裝
1
|
https: //about .gitlab.com /installation/
|
直接下載源包地址
https://about.gitlab.com/downloads/archives/
1
2
3
4
5
6
|
安裝 #yum install curl openssh-server openssh-clients postfix cronie #service postfix start #chkconfig postfix on #lokkit -s http -s ssh #rpm -i gitlab-ce-XXX.rpm |
GitLab載入配置與啟動
1
2
|
#gitlab-ctl reconfigure #gitlab-ctl start/restart |
GitLab日誌檢視
1
2
|
#gitlab-ctl tail nginx #gitlab-ctl tail unicorn |
GitLab CE 備份與恢復
備份
1
2
3
4
5
|
gitlab-rake gitlab:backup:create 可設定自動備份任務 0 2 * * * /opt/gitlab/bin/gitlab-rake gitlab:backup:creat
|
更改預設路徑,可以在 /etc/gitlab/gitlab.rb
檔案的 gitlab_rails['backup_path']
項中進行設定,預設為 /var/opt/gitlab/backups
。
恢復
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# 停止需要連線資料庫的服務 #gitlab-ctl stop unicorn #gitlab-ctl stop sidekiq # 恢復備份的資料,重寫資料庫內容 # GitLab 8.15 版本以前所用的時間戳格式為 EPOCH (1393513186) #gitlab-rake gitlab:backup:restore BACKUP=1459620009 # 或# GitLab 8.15 版本以後所用的時間戳格式為 EPOCH_YYYY_MM_DD (1491415349_2017_04_06) # gitlab-rake gitlab:backup:restore BACKUP=1491415349_2017_04_06 # 啟動 GitLabsudo gitlab-ctl start # 檢查 GitLab 是否正常執行 #gitlab-rake gitlab:check SANITIZE=true |
GitLab CE遷移與升級
遷移可參考備份與恢復,需要注意的是:版本號一定要一致
升級
跨版本升級在這裡不過多介紹,如大版本9,升級過程下載相關安裝包進行安裝,自動會完成升級
GitLab CE 使用小節
1、專案地址為localhost
#vi /var/opt/gitlab/gitlab-rails/etc/gitlab.yml
1
2
3
4
5
6
|
## GitLab settings
gitlab:
## Web server settings (note: host is the FQDN, do not include http://)
host: localhost
port: 80
https: false
|
2、merge 、chekout 出現以下錯誤:
GitLab: The project you were looking for could not be found.
此類錯誤多出現在git-data掛載軟連結導致
如我的掛載 /var/opt/gitlab -> /data/gitlab, 修改參照以下
1
2
3
4
|
# /etc/gitlab/gitlab.rb ...... git_data_dirs({ "default" => { "path" => "</data/gitlab/git-data>" , 'gitaly_address' => 'unix:/var/opt/gitlab/gitaly/gitaly.socket' } })
...... |
本文轉自 jackjiaxiong 51CTO部落格,原文連結:http://blog.51cto.com/xiangcun168/1951028
相關文章
- OBMysql4.3.0.1的升級與備份恢復MySql
- Nginx 下SSL證書安裝/配置/測試/備份/恢復Nginx
- 詳解叢集級備份恢復:物理細粒度備份恢復
- Z-Blog的安裝與升級注意事項
- RAC備份恢復之Voting備份與恢復
- 賦能雲HBase備份恢復 百T級別資料量備份恢復支援
- ClickHouse資料庫單機安裝及備份恢復資料庫
- MySQL備份和恢復方法彙總MySql
- 備份與恢復:polardb資料庫備份與恢復資料庫
- MySQL備份與恢復——基於Xtrabackup物理備份恢復MySql
- 從nub備份恢復(同平臺)恢復RAC至單例項單例
- mydumper備份恢復
- Mysql備份恢復MySql
- 備份和恢復
- SVN安裝配置及安全注意事項
- Oracle邏輯備份與恢復選項說明Oracle
- MySQL備份與恢復——基於MyDumper/MyLoader 邏輯備份恢復MySql
- Mysql備份與恢復(1)---物理備份MySql
- rman 增量備份恢復
- Jenkins備份與恢復Jenkins
- Postgresql 備份與恢復SQL
- MySQL 備份與恢復MySql
- KunlunDB備份和恢復
- RMAN備份恢復技巧
- redis 備份和恢復Redis
- Grafana 備份恢復教程Grafana
- 【PG備份恢復】pg_basebackup 多表空間備份恢復測試
- MySQL備份與恢復——基於OUTFILE /LOAD DATA 邏輯備份恢復MySql
- MySQL 非常規恢復與物理備份恢復MySql
- Mysql備份與恢復(2)---邏輯備份MySql
- 如何備份和恢復你的TFS伺服器(一)伺服器
- 如何備份和恢復你的TFS伺服器(二)伺服器
- 如何備份和恢復你的TFS伺服器(三)伺服器
- SqlServer備份和恢復(二)SQLServer
- Oracle 備份 與 恢復 概述Oracle
- Oracle 備份恢復之 FlashbackOracle
- SqlServer 備份和恢復(一)SQLServer
- 【MySQL】MySQL備份和恢復MySql
- DB的備份與恢復