mirror of
https://github.com/gitlabhq/gitlab-recipes.git
synced 2026-01-08 22:18:02 -05:00
add mysql-postgresql-converter submodule, and updated document
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
***The following howto assumes that you are running Debian 7 (wheezy)***
|
||||
|
||||
# Stop Gitlab
|
||||
|
||||
```bash
|
||||
@@ -12,6 +14,8 @@ sudo apt-get install -y postgresql-9.1 postgresql-client libpq-dev
|
||||
|
||||
# Initial Setup
|
||||
|
||||
The following initial setup was taken from installation.md from the main installtion doc
|
||||
|
||||
```bash
|
||||
# Login to PostgreSQL
|
||||
sudo -u postgres psql -d template1
|
||||
@@ -38,6 +42,8 @@ sudo -u git -H bundle install --deployment --without development test mysql aws
|
||||
|
||||
# Dump the mysql database
|
||||
|
||||
Make sure you do this as root, and therefore you will also need the root password for mysql as well
|
||||
|
||||
```bash
|
||||
mysqldump --compatible=postgresql --default-character-set=utf8 -r /tmp/gitlabhq_production.mysql -u root -p gitlabhq_production
|
||||
```
|
||||
@@ -46,9 +52,11 @@ mysqldump --compatible=postgresql --default-character-set=utf8 -r /tmp/gitlabhq_
|
||||
|
||||
```bash
|
||||
wget https://raw.github.com/lanyrd/mysql-postgresql-converter/master/db_converter.py -O /tmp/db_converter.py
|
||||
python db_converter.py /tmp/gitlab_production.mysql /tmp/gitlab_production.psql
|
||||
python /tmp/db_converter.py /tmp/gitlab_production.mysql /tmp/gitlab_production.psql
|
||||
```
|
||||
|
||||
***Note:*** This was tested using debian 7, with python 2.7.3
|
||||
|
||||
# Import the database
|
||||
|
||||
```bash
|
||||
@@ -63,9 +71,28 @@ sudo -u git -H cp database.yml database.yml.backup
|
||||
sudo -u git -H cp database.yml.postgresql database.yml
|
||||
```
|
||||
|
||||
The defaults from the database.yml should work if you have not made any modifications to the postgres authentication. You may need to change database.yml to suite your config.
|
||||
|
||||
# Start Gitlab service
|
||||
|
||||
```bash
|
||||
service gitlab start
|
||||
service nginx restart
|
||||
```
|
||||
|
||||
# Check application Status
|
||||
|
||||
Check if GitLab and its environment are configured correctly:
|
||||
|
||||
```bash
|
||||
cd ~git/gitlab
|
||||
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
|
||||
```
|
||||
|
||||
To make sure you didn't miss anything run a more thorough check with:
|
||||
|
||||
```bash
|
||||
cd ~git/gitlab
|
||||
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
|
||||
```
|
||||
|
||||
|
||||
Submodule database/migrate-mysql-to-postgres/mysql-postgresql-converter added at 3aef484c05
Reference in New Issue
Block a user