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 Dec 11, 2012
·
2 revisions
GitLab ceases to support SQLite from v4.0 onwards. If you are still using SQLite follow these steps in order to migrate your data from SQLite to MySQL.
- Update to the latest GitLab
- Run
bundle exec rake db:data:dump RAILS_ENV=production
to extract the data currently stored in SQLite. - Follow the database setup guide to install MySQL and update your
database.yml
- 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 2 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.