forked from gitlabhq/gitlabhq
-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate from SQLite to MySQL
riyad edited this page Oct 23, 2012
·
1 revision
Since v2.3 GitLab officially supports MySQL databases. Follow these steps in order to migrate your data from SQLite to MySQL:
- Update to the latest GitLab
- Install the MySQL server on your system
- Run
bundle exec rake db:data:dump RAILS_ENV=production
to extract the data currenty stored in SQLite. - Update your
database.yml
to use MySQL (seedatabase.yml.mysql
for an example configuration) - Run
bundle exec rake db:setup RAILS_ENV=production
to setup your database tables in MySQL. - Run
bundle exec rake db:data:load RAILS_ENV=production
to load the data saved in step 3 into MySQL. - Rename your
db/production.sqlite
file (don't delete it yet). - Restart GitLab and test if all the data has been transfered correctly.
- Delete your
db/*.sqlite
files, if you are sure everything worked.