You are here
Daan Croon - Thu, 2012/08/30 - 23:51
Hello,
Is upgrading an existing 'out of the box' Redmine server to the latest Turnkey 12 version usefull? And how can the upgrade be done without losing content?
Thx for your help!
Forum:
Worth a shot I reckon
If you run a TKLBAM backup of your existing server and then restore it to a new instance of the v12.0 appliance hopefully it'll just work. Having said that there may be some tweaking required (depends on the changes made to the software between the version included on v11.x and the version included on v12.0). Personally I wouldn't destroy your existing instance/appliance until you are sure all is well...
If it doesn't all work as expected then I would check for any Redmine docs on upgrading from the version in v11 to the version in v12 (check the TKL Redmine appliance page to see which versions are included in each).
I guess it's probably even better to do that homework first if you are keen (although it's not the way I usually do things! :D).
It'd be great if you document your experience (this thread is as good a place as any) even if it fails and you can't work out why or how to fix it, at least we'll know there is an issue and we can look at how to resolve it.
A few things I had to do to get redmine working again...
I upgraded from 11.2 to 12.0. I used TKLBAM. I experienced the following problems with corresponding fixes:
Problem: SSH stopped working after the restore of the backup.
Cuase: When the restore was done and the packages were updated the old files in /etc from the restore were left untouched. This is becuase the package intentionally doesn't upgrade these files if it thinks they have been modified. The problem with that is that they were still the old files from Ubuntu. So when you tried to start SSH it was looking for the upstart related files. These are present on Squeeze by default.
Resolution:
cd /etc/ssh
tar -cvf * ~/ssh.backup.tar
sudo apt-get remove openssh-server openssh-client ssh
sudo dpkg --purge openssh-server openssh-client ssh
sudo apt-get install ssh
cd /etc/ssh
tar -xvf ~/ssh.backup.tar
This restored all of the files from the package.
Problem: redmine couldn't connect to the database
Cuase: The redmine user was not in the database
Resolution:
create the redmine user in the database with these instructions( http://dev.mysql.com/doc/refman/5.1/en/create-user.html ) making sure to create the user as 'redmine'@'localhost'
Set the users password ( http://dev.mysql.com/doc/refman/5.1/en/set-password.html )
Grant the user access to the databases( http://dev.mysql.com/doc/refman/5.1/en/grant.html )
After the restore there were 6 databases:
Old Databases from my restore
railsapp_development
railsapp_production
railsapp_test
New databases from the new versoin
redmine_development
redmine_production
redmine_test
Edit /var/www/redmine/config/database.yml and change the password in all three places ( found an example here http://www.tutorialspoint.com/ruby-on-rails/rails-database-setup.htm )
Restart as needed
Problem: None of my old database was showing up in Redmine
Cuase: /var/www/redmine/config/database.yml was pointing to the wrong database
Resolution:
Changed redmine_* to railsapp_*
Problem: Couldn't login after fixing all of the changes above
Cause: Not sure I undestand on this one but found a thread on the redmine forums that said to do the steps below.( http://www.redmine.org/boards/2/topics/24762 )
Resolution:
As root I did the following:
cd /var/www/redmine
rake db:migrate RAILS_ENV=production
rake db:migrate_plugins RAILS_ENV=production
I hope this helps someone else.
Check out what's happening on http://linuxinstall.net
Thanks heaps for documenting
Great work! :)
Hi Wags, Thanks for posting
Hi Wags,
Thanks for posting your steps. I'm trying to do the same (except I'm upgrading from v11.1 or the Redmine appliance). I seem to be experiencing the same problems as you but your procedure fails for me at the beginning. I can't seem to remove openssh-server. I get errors which seem to be caused by the removal or openssh-server
I can't seem to get passed this. Does it look familiar to you? Any advice would be greatly appreciated.
Thanks,
Jack
Found Solution...
Ok so a bit more narrowing down and I found the solution to my problem. From here:
Solution from above:
Future Proofing...
In the interests of future proofing this configuration, after you have migrated the database and get Redmine up and running, would it be a good idea to copy your data from the 'railsapp_*' databases, back into the 'redmine_*' databases, undo the changes to '/var/www/redmine/config/database.yml' and delete the old 'railsapp_* databases.
Or would it even matter?
Thank you Wags..
Installing the latest version in Virtualbox and restoring the old server from the cloud didn't work in my case either:
There appears to be a database problem.
rake db:migrate
to ensure that the database schema is up-to-date.Add new comment