Skip to content

Commit 051555f

Browse files
committed
add mysql-postgresql-converter submodule, and updated document
1 parent 88e0a71 commit 051555f

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "database/migrate-mysql-to-postgres/mysql-postgresql-converter"]
2+
path = database/migrate-mysql-to-postgres/mysql-postgresql-converter
3+
url = https://github.com/lanyrd/mysql-postgresql-converter.git

database/migrate-mysql-to-postgres/README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
***The following howto assumes that you are running Debian 7 (wheezy)***
2+
13
# Stop Gitlab
24

35
```bash
@@ -12,6 +14,8 @@ sudo apt-get install -y postgresql-9.1 postgresql-client libpq-dev
1214

1315
# Initial Setup
1416

17+
The following initial setup was taken from installation.md from the main installtion doc
18+
1519
```bash
1620
# Login to PostgreSQL
1721
sudo -u postgres psql -d template1
@@ -38,6 +42,8 @@ sudo -u git -H bundle install --deployment --without development test mysql aws
3842

3943
# Dump the mysql database
4044

45+
Make sure you do this as root, and therefore you will also need the root password for mysql as well
46+
4147
```bash
4248
mysqldump --compatible=postgresql --default-character-set=utf8 -r /tmp/gitlabhq_production.mysql -u root -p gitlabhq_production
4349
```
@@ -46,9 +52,11 @@ mysqldump --compatible=postgresql --default-character-set=utf8 -r /tmp/gitlabhq_
4652

4753
```bash
4854
wget https://raw.github.com/lanyrd/mysql-postgresql-converter/master/db_converter.py -O /tmp/db_converter.py
49-
python db_converter.py /tmp/gitlab_production.mysql /tmp/gitlab_production.psql
55+
python /tmp/db_converter.py /tmp/gitlab_production.mysql /tmp/gitlab_production.psql
5056
```
5157

58+
***Note:*** This was tested using debian 7, with python 2.7.3
59+
5260
# Import the database
5361

5462
```bash
@@ -63,9 +71,28 @@ sudo -u git -H cp database.yml database.yml.backup
6371
sudo -u git -H cp database.yml.postgresql database.yml
6472
```
6573

74+
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.
75+
6676
# Start Gitlab service
6777

6878
```bash
6979
service gitlab start
7080
service nginx restart
7181
```
82+
83+
# Check application Status
84+
85+
Check if GitLab and its environment are configured correctly:
86+
87+
```bash
88+
cd ~git/gitlab
89+
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
90+
```
91+
92+
To make sure you didn't miss anything run a more thorough check with:
93+
94+
```bash
95+
cd ~git/gitlab
96+
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
97+
```
98+

0 commit comments

Comments
 (0)