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.
This commit is contained in:
parent
f08cb26487
commit
8ee3299cc4
|
@ -19,7 +19,9 @@ git clone https://github.com/lanyrd/mysql-postgresql-converter.git
|
||||||
cd mysql-postgresql-converter
|
cd mysql-postgresql-converter
|
||||||
mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root gitlabhq_production
|
mysqldump --compatible=postgresql --default-character-set=utf8 -r databasename.mysql -u root gitlabhq_production
|
||||||
python db_converter.py databasename.mysql databasename.psql
|
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
|
sudo service gitlab start
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue