Commit 249801511ec7b1e06f90b0bb5b2d46d312dd59c5
Committed by
gz
1 parent
155c7ebf
Exists in
master
and in
11 other branches
Added instructions on upgrading from non-Omnibus mysql to on Omnibus installation.
Showing
1 changed file
with
51 additions
and
14 deletions
Show diff stats
doc/update.md
@@ -6,20 +6,6 @@ Please make sure you are viewing this file on the master branch. | @@ -6,20 +6,6 @@ Please make sure you are viewing this file on the master branch. | ||
6 | 6 | ||
7 |  | 7 |  |
8 | 8 | ||
9 | -## Upgrading from a non-Omnibus installation to an Omnibus installation | ||
10 | - | ||
11 | -Upgrading from non-Omnibus installations has not been tested by GitLab.com. | ||
12 | - | ||
13 | -If you are using a MySQL database you have to configure a [non-packaged MySQL database](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#using-a-non-packaged-database-management-server) or [convert to PostgreSQL](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/mysql_to_postgresql.md) before the backup. | ||
14 | - | ||
15 | -Please be advised that you lose your settings in files such as gitlab.yml, unicorn.rb and smtp_settings.rb. | ||
16 | -You will have to [configure those settings in /etc/gitlab/gitlab.rb](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). | ||
17 | -SMTP is not supported in omnibus-gitlab at this time. | ||
18 | - | ||
19 | -Upgrade by [creating a backup from the non-Omnibus install](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md#create-a-backup-of-the-gitlab-system) and [restoring this in the Omnibus installation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#restoring-an-application-backup). | ||
20 | -Please ensure you are using exactly equal versions of GitLab (for example 6.7.3) when you do this. | ||
21 | -You might have to upgrade your non-Omnibus installation before creating the backup to archive this. | ||
22 | - | ||
23 | ## Updating from GitLab 6.6.x or higher to 6.8.x | 9 | ## Updating from GitLab 6.6.x or higher to 6.8.x |
24 | 10 | ||
25 | First, download the latest [CE](https://www.gitlab.com/downloads/) or | 11 | First, download the latest [CE](https://www.gitlab.com/downloads/) or |
@@ -112,3 +98,54 @@ sudo gitlab-rake gitlab:backup:restore BACKUP=12345 # where 12345 is your backup | @@ -112,3 +98,54 @@ sudo gitlab-rake gitlab:backup:restore BACKUP=12345 # where 12345 is your backup | ||
112 | # Start GitLab | 98 | # Start GitLab |
113 | sudo gitlab-ctl start | 99 | sudo gitlab-ctl start |
114 | ``` | 100 | ``` |
101 | + | ||
102 | +## Upgrading from a non-Omnibus installation to an Omnibus installation | ||
103 | +Upgrading from non-Omnibus installations has not been tested by GitLab.com. | ||
104 | + | ||
105 | +Please be advised that you lose your settings in files such as gitlab.yml, unicorn.rb and smtp_settings.rb. | ||
106 | +You will have to [configure those settings in /etc/gitlab/gitlab.rb](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). | ||
107 | +SMTP is not supported in omnibus-gitlab at this time. | ||
108 | + | ||
109 | +### Upgrading from non-Omnibus PostgreSQL to an Omnibus installation | ||
110 | +Upgrade by [creating a backup from the non-Omnibus install](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md#create-a-backup-of-the-gitlab-system) and [restoring this in the Omnibus installation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#restoring-an-application-backup). | ||
111 | +Please ensure you are using exactly equal versions of GitLab (for example 6.7.3) when you do this. | ||
112 | +You might have to upgrade your non-Omnibus installation before creating the backup to achieve this. | ||
113 | + | ||
114 | +### Upgrading from non-Omnibus MySQL to an Omnibus installation (version 6.8+) | ||
115 | +Unlike the previous chapter, the non-Omnibus installation is using MySQL while the Omnibus installation is using PostgreSQL. | ||
116 | + | ||
117 | +Option #1: Omnibus can be configured to use an external [non-packaged MySQL database](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#using-a-non-packaged-database-management-server). | ||
118 | + | ||
119 | +Option #2: Convert to PostgreSQL and use the built-in server as the instructions below. | ||
120 | + | ||
121 | +* [create a backup of the non-Omnibus MySQL installation.](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/backup_restore.md#create-a-backup-of-the-gitlab-system) | ||
122 | +* unpack the newly created backup. | ||
123 | + | ||
124 | +```shell | ||
125 | +mkdir unpacked_backup | ||
126 | +tar -C unpacked_backup -xvf <TIMESTAMP>_gitlab_backup.tar | ||
127 | +``` | ||
128 | + | ||
129 | +* [export and convert the existing MySQL database](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/mysql_to_postgresql.md) (without importing to PostgreSQL). | ||
130 | + | ||
131 | +```shell | ||
132 | +mysqldump --compatible=postgresql --default-character-set=utf8 -r gitlab.mysql -u root gitlabhq_production | ||
133 | +python db_converter.py gitlab.mysql gitlab.psql | ||
134 | + | ||
135 | +``` | ||
136 | + | ||
137 | +* replace `unpacked_backup/db/database.sql` with the converted `gitlab.psql` | ||
138 | + | ||
139 | +```shell | ||
140 | +cp gitlab.pSql unpacked_backup/db/database.sql | ||
141 | +``` | ||
142 | + | ||
143 | +* repack the modified backup. | ||
144 | + | ||
145 | +```shell | ||
146 | +cd unpacked_backup | ||
147 | +tar cvf ../converted_gitlab_backup.tar * | ||
148 | +``` | ||
149 | + | ||
150 | +* [restoring this in the Omnibus installation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#restoring-an-application-backup) | ||
151 | +* Enjoy! |