Original from http://www.redmine.org/projects/redmine/wiki/RedmineUpgrade

upgrade 1.3.2(Ubuntu) to 2.4.2(Gentoo)

copy distrib redmine to new server and unpack to new folder

do not copy old configs

copy files folder

copy plugins folder

adjust database.yml according to manual

dump db with no parameters

# mysqldump redmine_database --result-file=/root/redmine_database.sql

create new database:

mysql> CREATE DATABASE `redmine_new_db` CHARACTER SET utf8 COLLATE utf8_general_ci;

restore db with no parameters

# mysql redmine_new_db < /root/redmine_database.sql

cd to new redmine folder (/var/lib/redmine)

# rake generate_secret_token

# rake db:migrate RAILS_ENV=production

if got error :

==  CreateChangesetParents: migrating =========================================
-- create_table(:changeset_parents, {:id=>false})
rake aborted!
StandardError: An error has occurred, all later migrations canceled:

Mysql2::Error: Table 'changeset_parents' already exists: CREATE TABLE `changese'
Tasks: TOP => db:migrate
(See full trace by running task with --trace)

do

# mysql -e 'drop table `changeset_parents`' redmine2new

then migration ok