edavis10 (owner)

Forks

Revisions

gist: 183286 Download_button fork
public
Description:
Moving and upgrading a Redmine database
Public Clone URL: git://gist.github.com/183286.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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.
 
    !!!! 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> quit
 
4. Now import your database to the empty database on the new server.
 
    mysql -u your_user -p your_redmine_database < /path/to/backup_sql_file.sql
 
5. Now it's time to do the migrations to convert your data backup to the latest version.
 
    cd /path/to/redmine
 
6. Run the Redmine core migrations
 
    rake db:migrate RAILS_ENV=production
 
7. Run any Redmine plugin migrations
 
    rake db:migrate_plugins RAILS_ENV=production
 
6. 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.)