Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Support Installation & Updates
  1. OpenProject
  2. Forums
  3. Support Installation & Updates
  4. Migrating from 4.0.5 to 5.0.9

Migrating from 4.0.5 to 5.0.9

Added by Frank Z over 9 years ago

Hi all,

after migrating openproject data (i.e. SQL dump + files) from 4.0.5 (Debian wheezy) to 5.0.9 (Debian jessie),
images within wiki pages and work packages are not displayed.

This is what I did:

  • On 4.0.5 wheezy

    mysqldump --single-transaction --add-drop-table --add-locks --host=localhost --user=openproject --result-file=backup.sql openproject

  • On 5.0.9 jessie:

    mysql -uroot -p
    mysql> CREATE DATABASE openproject CHARACTER SET utf8;
    mysql> CREATE USER 'openproject'@'localhost' IDENTIFIED BY 'supersecretpasswd';
    mysql> GRANT ALL PRIVILEGES ON openproject.* TO 'openproject'@'localhost';
    mysql> \q

    mysql -h localhost -p openproject < backup.sql

    apt-get install openproject
    openproject configure # reusing existing database

    scp <old4.0.5>:/var/db/openproject/files/* /var/db/openproject/files/
    chown openproject.openproject /var/db/openproject/files/*

    service openproject restart
    service apache restart

Images are not displayed within wiki pages.
I decided to redo the well known rake tasks:

openproject run rake db:migrate --trace
openproject run rake db:seed --trace
openproject run rake assets:precompile --trace

There are no obvious errors, at least I can’t see them!
Please find the respective logs attached.

Here is a short excerpt from the main log files:

  • 4.0.5

    Started GET "/openproject/attachments/386/download" for XXX.XX.XX.XX at 2016-01-19 15:04:14 +0100
    Processing by AttachmentsController#download as HTML
    Parameters: {"id"=>"386"}
    Sent file /var/db/openproject/files/150923142638_gis_overview_small.png (0.1ms)
    Completed 200 OK in 32.1ms (ActiveRecord: 2.2ms)

  • 5.0.9

    I, [2016-01-19T15:02:02.616658 #14300] INFO -- : Started GET "/openproject/attachments/386" for XXX.XX.XX.XX at 2016-01-19 15:02:02 +0100
    I, [2016-01-19T15:02:02.618179 #14300] INFO -- : Processing by AttachmentsController#download as HTML
    I, [2016-01-19T15:02:02.618248 #14300] INFO -- : Parameters: {"id"=>"386"}
    I, [2016-01-19T15:02:02.644354 #14300] INFO -- : Completed 500 Internal Server Error in 26ms (ActiveRecord: 1.1ms)
    F, [2016-01-19T15:02:02.646077 #14300] FATAL -- :
    TypeError (no implicit conversion of nil into String):
    app/uploaders/file_uploader.rb:47:in readable?' app/uploaders/file_uploader.rb:47:in readable?'
    app/models/attachment.rb:118:in readable?' app/controllers/attachments_controller.rb:68:in file_readable'
    app/middleware/params_parser_with_exclusion.rb:40:in `call'

Thanks for support!
All the best,

Frank


Replies (5)

RE: Migrating from 4.0.5 to 5.0.9 - Added by Frank Z over 9 years ago

Hello again,

after migrating openproject data (i.e. SQL dump + files) from 4.0.5 (Debian wheezy) to 5.0.9 (Debian jessie),
images within wiki pages and work packages are not displayed.

solved this issue, and thought it might be a good idea to let you know!

The trick is to have the images/attachments in place (i.e. /var/db/openproject/files) before running openproject configure.

Best,

Frank

RE: Migrating from 4.0.5 to 5.0.9 - Added by Frank Z over 9 years ago

Hello once again,

despite the risk of a monologue,
here is another issue I am curious about …

after migrating openproject data (i.e. SQL dump + files) from 4.0.5 (Debian wheezy) to 5.0.9 (Debian jessie),

The howtos provide upgrade and migration instructions from 4.0 to 4.1, 4.1 to 4.2 and 4.2 to 5.0.
Does that mean I have to follow this sequence?
Is the one step upgrade process possibly causing some (not yet recognized) problems?

Frank

RE: Migrating from 4.0.5 to 5.0.9 - Added by Christian Schaefer over 8 years ago

F Z wrote:

Hello again,

after migrating openproject data (i.e. SQL dump + files) from 4.0.5 (Debian wheezy) to 5.0.9 (Debian jessie),
images within wiki pages and work packages are not displayed.

solved this issue, and thought it might be a good idea to let you know!

The trick is to have the images/attachments in place (i.e. /var/db/openproject/files) before running openproject configure.

Best,

Frank

I have the problem too.

Installed Version 6.0.5.

Copied files in /var/db/openproject/files and changed the rights.

After reading this post do a

openproject reconfigure

but still the same problem.

Any ideas?

RE: Migrating from 4.0.5 to 5.0.9 - Added by Christian Schaefer over 8 years ago

Solution:

Upgrade to Version 5 and copied before the attachments.

Again upgrade to Version 6 successful.

RE: Migrating from 4.0.5 to 5.0.9 - Added by Oliver Günther over 8 years ago

Hey Christian,

great to hear the upgrade eventually worked. Do you have suggestions for improvements on the upgrade guide regarding your issue?

Best,
Oliver

  • (1 - 5/5)
Loading...