Upgrade Redmine 2.4 to Redmine 3.2: Import database

时间:2022-05-30 08:03:46

After install redmine 3.2, you may import the data of old version redmine to redmine 3.2.

1) Create a new clean database

sudo mysql -u root -p
drop database redmine;
CREATE DATABASE redmine character SET utf8;
GRANT ALL privileges ON redmine.* TO 'redmine'@'localhost';

2) Import old redmine database to new redmine

/usr/bin/mysql -u root -p redmine < /redmine_db_dir/redmine_db_16_02_27.sql

3) Generate new secret and Update db and plugins

sudo su - redmine
cd redmine
rake generate_secret_token
rake db:migrate RAILS_ENV=production
rake redmine:plugins:migrate RAILS_ENV=production
rake tmp:cache:clear
rake tmp:sessions:clear
exit