Project

General

Profile

update redmine from version 3.1.1 to 3.4.3.

Added by Liliana Paolini about 7 years ago

Hello,

I have Redmine 3.1.1 and I want to update it to version 3.4.3. Can I do it directly or do I have to do it by updating previously to each of the intermediate versions?

Thank you


Replies (3)

RE: update redmine from version 3.1.1 to 3.4.3. - Added by Ivan Cenov about 7 years ago

Last week I updated Redmine from 2.6.10 to 3.4.3 combined with migrating to a new server without any problems.

Old Redmine 2.6.10, Ruby 1.9.3
New Redmine 3.4.3, Ruby 2.3.3

I installed new Redmine without plugins, but instead of intializing the database, I imported the database from old Redmine. The imported data contained the data of the plugins so as to be able to make plugins' migrations afterwards.

The plugins may be a problem because of version incompatibility. For the plugins with new versions, I copied them instead of these in old Redmine. Then migrated their database tables.

RE: update redmine from version 3.1.1 to 3.4.3. - Added by Liliana Paolini about 7 years ago

Thank you very much Ivan.

To perform the update, I have to uninstall the old version of Redmine and then install the new one? Or I install the new version of Redmine without uninstalling anything?

Thank

RE: update redmine from version 3.1.1 to 3.4.4. - Added by Ivan Cenov about 7 years ago

Hello,

Here is my step-by-step instruction, that works well.

You don't have to uninstall the old version, just have to migrate the database and move to the new version. I usually upgrade Redmine in the following steps. This procedure can be used when there is no migration to another machine with another Ruby / MySQL installation.

  1. Stop current Redmine
  2. SQL dump database (I use MySQL)
  3. Download new Redmine in a new folder, not where the current Redmine resides. Par example redmine-3.4.4.
  4. Copy your database settings file config/database.yml into the new config folder:
    redmine\config\database.yml ---> redmine-3.4.4\config\database.yml
    Note: Check if there are differencies between redmine\config\database.yml.example and
    redmine-3.4.4\config\database.yml.example and make corrections in
    redmine-3.4.4\config\database.yml if needed. Use Winmerge if possible.
  5. Copy your configuration file config/configuration.yml into the new config folder:
    redmine\config\configuration.yml --> redmine-3.4.4\config\configuration.yml
    Note: Check if there are differencies between redmine\config\configuration.yml.example
    and redmine-3.4.4\config\configuration.yml.example and make corrections in
    redmine-3.4.4\config\configuration.yml if needed. Use Winmerge if possible.
  6. Copy Gemfile.local into your new installation (if you have one):
    redmine\Gemfile.local --> redmine-m.n.p\Gemfile.local
  7. Check Gemfile. It you have done local modifications do Winmerge, not direct copy.
  8. Copy the redmine\files folder content into your new installation:
    redmine\files --> redmine-3.4.4\files
  9. Copy the additional installed themes from redmine\public\themes to redmine-3.4.4\public\themes
    If the themes shipped with Redmine were modified in the old installation, copy/move the changes in the new installation if applicable.
  10. Copy your installed plugins from redmine\plugins to redmine-3.4.4\plugins.
    Note that you have to check for new released versions of the plugins and also check the compatibility of present versions with the new version of Redmine. See http://www.redmine.org and/or plugins' sites for new versions.
  11. Rename current Redmine folder to its original name, i.e. redmine --> redmine-3.1.1
  12. Rename the new redmine folder to redmine, i.e. redmine-3.4.4 --> redmine.
  13. Open a console that have access to ruby devkit (for ruby 2.3 or less) or MSYS2 (for Ruby 2.4) in PATH= variable. Note: I use ruby 2.3, because mysql2 gem is not ready for ruby 2.4 yet (it soon will be ready for 2.4 and 2.5). Go to new Redmine folder.
  14. Run 'bundle install --without test development' or 'bundle install --without test development rmagick' if you do not use rmagick / ImageMagick
  15. Run the following command from your Redmine root folder 'rake generate_secret_token'
  16. Update core tables. Execute 'rake db:migrate RAILS_ENV=production'
  17. Update plugin tables. Execute 'rake redmine:plugins:migrate RAILS_ENV=production'
  18. You should clear the cache and the existing sessions by executing following commands:
    rake tmp:cache:clear
    rake tmp:sessions:clear
  19. Start Redmine. If all has gone well, you have to see new Redmine in your browser.

If you have to do migration to another machine in addition to upgrade you have to follow almost the installation procedure with an essential exception. You have not to execute

bundle exec rake db:migrate RAILS_ENV=production
bundle exec rake redmine:load_default_data RAILS_ENV=production

Instead, you have to create database on the new server, create redmine user and import the SQL dump, made at the beginning of the above procedure. After that you have to execute database migrations by 'rake db:migrate RAILS_ENV=production' and 'rake redmine:plugins:migrate RAILS_ENV=production'. Be sure that the plugins are compatible with new Redmine.

If you have not found compatible version of a plugin, do not uninstall the old version before upgrade/migration. Just don't put it into plugins folder. 'This way you will keep the plugin data for better times in the future.

    (1-3/3)