Commit 8ee3299c authored by Jacob Vosmaer's avatar Jacob Vosmaer

Import the database as the `git` user

This ensures that all tables created during the import belong to `git`.
If you import as a different user, such as the `postgres` superuser, you
may encounter issues where the GitLab database user cannot access tables
in gitlabhq_production, _even if_ `git` is the owner of
gitlabhq_production at the time of import.
parent f08cb264
......@@ -19,7 +19,9 @@ git clone https://github.com/lanyrd/mysql-postgresql-converter.git
cd mysql-postgresql-converter
mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root gitlabhq_production
python db_converter.py databasename.mysql databasename.psql
psql -f databasename.psql -d gitlabhq_production
# Import the database dump as the application database user
sudo -u git psql -f databasename.psql -d gitlabhq_production
sudo service gitlab start
```
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment