diff --git a/doc/update.md b/doc/update.md index 1e05ca8..e6bf574 100644 --- a/doc/update.md +++ b/doc/update.md @@ -6,20 +6,6 @@ Please make sure you are viewing this file on the master branch. ![documentation version](doc/images/omnibus-documentation-version-update-md.png) -## Upgrading from a non-Omnibus installation to an Omnibus installation - -Upgrading from non-Omnibus installations has not been tested by GitLab.com. - -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. - -Please be advised that you lose your settings in files such as gitlab.yml, unicorn.rb and smtp_settings.rb. -You will have to [configure those settings in /etc/gitlab/gitlab.rb](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). -SMTP is not supported in omnibus-gitlab at this time. - -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). -Please ensure you are using exactly equal versions of GitLab (for example 6.7.3) when you do this. -You might have to upgrade your non-Omnibus installation before creating the backup to archive this. - ## Updating from GitLab 6.6.x or higher to 6.8.x 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 # Start GitLab sudo gitlab-ctl start ``` + +## Upgrading from a non-Omnibus installation to an Omnibus installation +Upgrading from non-Omnibus installations has not been tested by GitLab.com. + +Please be advised that you lose your settings in files such as gitlab.yml, unicorn.rb and smtp_settings.rb. +You will have to [configure those settings in /etc/gitlab/gitlab.rb](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#configuration). +SMTP is not supported in omnibus-gitlab at this time. + +### Upgrading from non-Omnibus PostgreSQL to an Omnibus installation +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). +Please ensure you are using exactly equal versions of GitLab (for example 6.7.3) when you do this. +You might have to upgrade your non-Omnibus installation before creating the backup to achieve this. + +### Upgrading from non-Omnibus MySQL to an Omnibus installation (version 6.8+) +Unlike the previous chapter, the non-Omnibus installation is using MySQL while the Omnibus installation is using PostgreSQL. + +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). + +Option #2: Convert to PostgreSQL and use the built-in server as the instructions below. + +* [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) +* unpack the newly created backup. + +```shell +mkdir unpacked_backup +tar -C unpacked_backup -xvf _gitlab_backup.tar +``` + +* [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). + +```shell +mysqldump --compatible=postgresql --default-character-set=utf8 -r gitlab.mysql -u root gitlabhq_production +python db_converter.py gitlab.mysql gitlab.psql + +``` + +* replace `unpacked_backup/db/database.sql` with the converted `gitlab.psql` + +```shell +cp gitlab.pSql unpacked_backup/db/database.sql +``` + +* repack the modified backup. + +```shell +cd unpacked_backup +tar cvf ../converted_gitlab_backup.tar * +``` + +* [restoring this in the Omnibus installation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md#restoring-an-application-backup) +* Enjoy! -- libgit2 0.21.2