Project

General

Profile

database (only) upgrade from 1.0.1 to 1.2.0

Added by Lorand David over 13 years ago

Hi, I have a working copy of the redmine on server A (version: Redmine 1.0.1.devel.4070 (MySQL)) and I've installed a newer version of redmine to another server B. Currently the new (B) server has this version: Redmine 1.2.0.stable (MySQL)

I want to use the old database with the new installation. How can I upgrade the old db structure to the new one without loosing the data ?

Thanks!


Replies (5)

RE: database (only) upgrade from 1.0.1 to 1.2.0 - Added by Patrick Figel over 13 years ago

Hi,

that's pretty easy. Just execute rake db:migrate RAILS_ENV=production in your redmine folder. There's an Upgrade Guide with further details.
Make sure your config files and plugins match on both servers. And don't forget to backup the database first.

RE: database (only) upgrade from 1.0.1 to 1.2.0 - Added by Lorand David over 13 years ago

Thank you for your answer, but not sure I understand. I don't want to upgrade to the new version on the old server, only want to take the db and use it on the new server which has the new version of the redmine.

If I would run the db:migrate command on the old server (without any file change) I assume the server would not known the new db structure and running the migrate command on the new server doesn't make sense because it has doesn't have the old database.

Can you please clarify ? Thanks.

RE: database (only) upgrade from 1.0.1 to 1.2.0 - Added by Patrick Figel over 13 years ago

Uhm, okay, I guess I didn't understand your setup.
Do you want to run both versions of redmine on two different servers (in parallel)?

In this case I'd recommend to just copy the app and database from the old server, get it up and running (so you have two Redmine 1.0.1 instances) and then perform the update (on the new server) as explained in the upgrade guide. This would be the safe way.

Of course you could also try to just copy the database from the old to the new server and run the migration on the new server, but I think that would be more error-prone.

RE: database (only) upgrade from 1.0.1 to 1.2.0 - Added by Lorand David over 13 years ago

I want to use only the new server but I want to transfer the database first from the old one

RE: database (only) upgrade from 1.0.1 to 1.2.0 - Added by Lorand David over 13 years ago

Thanks for the help, I managed to copy and upgrade the db on the new server.

Steps I made:
1. Copied the old database to the new server.
2. Changed the the connection to the db in /etc/redmine/default/database.yml to the old db.
3. From the redmine folder executed rake db:migrate RAILS_ENV=production
4. Restart

    (1-5/5)