Skip to content

Instantly share code, notes, and snippets.

@michaeldv
Forked from edavis10/gist:183286
Created September 8, 2009 23:39
Show Gist options
  • Save michaeldv/183338 to your computer and use it in GitHub Desktop.
Save michaeldv/183338 to your computer and use it in GitHub Desktop.
1. Create a text backup of your data form the live server. This will ask for a password.
mysqldump -u your_user -p your_redmine_database > backup_sql_file.sql
2. Transfer the backup_sql_file.sql to your new server.
3. Once there, drop the existing database on the new server and import your database to the empty database on the new server.
!!!! Triple check this is on the new server and not your live one!!!!
mysql -u your_user -p your_redmine_database
mysql> DROP DATABASE your_redmine_database;
mysql> CREATE DATABASE your_redmine_database;
mysql> USE your_redmine_database;
mysql> \. /path/to/backup_sql_file.sql
mysql> quit
4. Now it's time to do the migrations to convert your data backup to the latest version.
cd /path/to/redmine
5. Run the Redmine core migrations
rake db:migrate RAILS_ENV=production
6. Run any Redmine plugin migrations
rake db:migrate_plugins RAILS_ENV=production
7. Then restart Redmine's web server and you should be good to go.
(Any of the MySQL commands can be carried out via a GUI if you have one.)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment