Home > Archives > Gitlab Migrate

Gitlab Migrate

Publish:

Gitlab服务器迁移

在做下面所有步骤之前,请确认新的服务器和旧的服务器版本是一致的。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# BACKUP
[root@localhost ~]# gitlab-rake gitlab:backup:create RAILS_ENV=production

# DOWNLOAD from source server
[root@localhost ~]# /var/opt/gitlab/backups/1500886271_gitlab_backup.tar

# UPLOAD to dest server
[root@localhost ~]# /var/opt/gitlab/backups/1500886271_gitlab_backup.tar

# RESTORE
[root@localhost ~]# gitlab-rake gitlab:backup:restore RAILS_ENV=production   BACKUP=1500889620

# RESET YOUR LOCAL
[root@localhost ~]# git remote set-url origin git@192.168.xx.xx:root/sample.git

# TEST TO PULL
[root@localhost ~]# get pull

# CLOSE SOURCE Server
[root@localhost ~]# gitlab-ctl stop

参考

Gitlab服务器迁移

声明: 本文采用 BY-NC-SA 授权。转载请注明转自: Ding Bao Guo