Upgrade Redmine+Agile

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

It is strongly recommended that you create a full backup before starting the update process. If you have important data, it is advisable that you create and try to restore a backup to ensure that everything works properly.

Upgrade Redmine and all stack components

The recommended way to upgrade Redmine is to migrate all the data to a fresh Bitnami installation, which runs the updated version of Redmine.

On the original Redmine server, follow the steps below:

  • Create a database backup file named bitnami_redmine.sql:

    $ mysqldump -u root -p --databases bitnami_redmine --add-drop-database > bitnami_redmine.sql
  • Copy Redmine application and plugin files from the directory installdir/apps/redmine/htdocs/files. You can compress the directory in Linux and macOS with the commands below:

    $ tar czf redmine_files.tar.gz -C installdir/apps/redmine/htdocs/files .
    $ tar czf redmine_plugins.tar.gz -C installdir/apps/redmine/htdocs/plugins .

Launch a new Redmine server and follow the steps below:

  • Stop Apache:

    $ sudo installdir/ stop apache
  • Upload the file redmine_files.tar.gz to the new server.

  • Restore the database backup:

    $ mysql -u root -p < bitnami_redmine.sql
  • Copy the Redmine application files to installdir/apps/redmine/htdocs/files. In Linux and macOS, copy redmine_files.tar.gz to the new instance and extract its contents:

    $ sudo tar xzf redmine_files.tar.gz -C installdir/apps/redmine/htdocs/files
  • Migrate the database to the latest version:

    $ cd installdir/apps/redmine/htdocs/
    $ sudo ruby bin/rake db:migrate RAILS_ENV=production
  • (Optional) If you had installed plugins in your previous installation, follow these steps:

    • Check that the plugins are compatible with the new version.
    • Copy the directories from the vendor/plugins directory into the new installation area, in the plugins directory. In Linux and macOS, copy redmine_plugins.tar.gz to the new instance and extract:

      $ sudo tar xzf redmine_plugins.tar.gz -C installdir/apps/redmine/htdocs/plugins
    • Install the plugins:

      $ ruby bin/rake redmine:plugins RAILS_ENV=production
  • Clean the cache:

    $ ruby bin/rake tmp:clear
  • Start Apache:

    $ sudo installdir/ start apache

Troubleshooting upgrades

  • If you see the following error, go to your database and remove the specified table and run the migration command again.

    Mysql::Error: Table 'changeset_parents' already exists: CREATE TABLE `changeset_parents` (`changeset_id` int(11) NOT NULL, `parent_id` int(11) NOT NULL) ENGINE=InnoDB

    Run these commands:

    $ mysql -u root -p
    mysql> use bitnami_redmine;
    mysql> drop table changeset_parents;
    $ cd installdir/apps/redmine/htdocs/
    $ ruby bin/rake db:migrate RAILS_ENV=production
Last modification April 8, 2020