This forum is no longer active. Please post your questions to our new community site
Fresh install of RS Redmine - how to bring old db across
|
|
Having tried and failed various other upgrade routes I finally downloaded bitnami-redmine-0.9.2-0-windows-installer.exe. Which worked perfect and now I have Redmine 0.9.2 up and running. Really easy and very pleased :-) All good but obviously it does not have my issues in it. Having looked at numerous links on upgrading I believe I can not simply restore my 0.8.6 db into this Redmine instance as the backed up SQL drops the new tables and replaces them with the older backed up table formats. So I need to import (migrate?) how do I do this? The commands I have seen suggest “rake db:migrate RAILS_ENV=production” if this is the case how does it know where to get the old db contents from? Note: I am running Windows Server 2008 standard. Thanks in advance |
|
|
@prexpressions My friend I will try to give you a step by step from the beginning and for this you have to have access to your old redmine running. I will assume that you have installed in the default folder, so from now on I will call it installdir . 1) Make a dump of the old database. Open the redmine console (installdir\use_redmine.bat) and run the following: mysqldump -u root -p bitnami_redmine > redmine_backup.sql This operation could take some time depending on the data size. Copy this file to a safe place. 2) Copy the folder installdir\apps\redmine\files and .yml files from the config also to a safe place. 3) Now in the new Redmine system open the console and do the following: mysql -u root -p drop database bitnami_redmine; the password should be the one you used in your old system for the administrator user flush privileges; 4) Using the file you saved before: mysql -u root -p bitnami_redmine < redmine_backup.sql 5) Now, from the console, go to the redmine folder and run: cd installdir\apps\redmine 6) Copy the folder files to the new correspondent place and also the .yml files. Restart the system and should be all running good! If you have a test machine, this is a good time to experiment this. Good luck! Thanks ScottR, Beltran, Bitnami Redmine Backup Tutorial and everybody! |
|
|
Thanks for the reply giordano. I did step 1 and 2, and then uninstalled my old RubyStack (and Redmine), as I was having various issues before installing the latest Redmine RubyStack. If I do step 3 that you suggest, when and how will the old data stored in the ‘redmine_backup.sql’ file get loaded into the new database. Or do I have to restore the old redmine instance – which is now dead and gone? (It also strikes me by dropping the table the new redmine db format is lost – and therefore just recreating the old db format in the new redmine instance sounds a strange thing to do, is this safe?) Thanks again for your support |
|
|
Since I posted the last comment you have added more steps so it makes far more sense to me! Now I get the message Access denied for user ’bitnami’@’localhost’ (using password: YES) In the mysql grant command I tried: grant all privileges on bitnami_redmine.* to ’bitnami’@’localhost’ identified by ‘the password for the admin user of the old system, which is the same as the new system’; grant all privileges on bitnami_redmine.* to ‘admin user name’@’localhost’ identified by ‘the password for the admin user of the old system, which is the same as the new system’; grant all privileges on bitnami_redmine.* to ’bn_redmine’@’localhost’ identified by ‘BITNAMI_USER_PASSWORD’; (bn_redmine being the user name listed in my old database.yml file) All give exactly the same Access denied message_ even after dropping and recreating the database at each attempt. For Step 5 I have also tried: rake db:migrate RAILS_ENV=“production” rake db:migrate RAILS_ENV=production set RAILS_ENV=production set RAILS_ENV=“production” The last one failing with a different message suggesting “production” is not the way to go Again any help is really appreciated – we feel blind without our issues db… |
|
|
Hi, There are two different passwords: 1. The MySQL root password, which is the same that the Remdine administrator password. You only use this issue to access manually to the database. For example:
2. The password of the “bitnami” database user. This password is random and you can find it in the /apps/redmine/config/database.yml. So you should run the following command:
Where “BITNAMI_USER_PASSWORD” is the password that you can find in the /apps/redmine/config/database.yml file. I hope it helps. |
|
|
> Where “BITNAMI_USER_PASSWORD” is the password that you can find in the /apps/redmine/config/database.yml file. Ah ha a top secret piece of information and with that knowledge I have been able to migrate! But now I get internal error when trying to access my Redmine db via ‘Access BitNami Redmine Stack’ from the Bitnami page. Question: My original database.yml has a production username of ‘bn_redmine’ the freshly installed Bitnami Redmine stack database.yml has a production username of ‘bitnami’. How exactly do I need to handle this situation? So should I start the new Redmine stack with the original database.yml, create the db, and grant privileges to ‘bitnami’ or ‘bn_redmine’? Once the migrate completes, should I replace the database.yml and then stop-start the system? I feel like we are making progress towards the goal so many thanks for your help, just a little more please :-) |
|
|
@prexpressions Sorry for so many edits in my first post. I was kinda late here (little bit sleepy)… If I remember it right, you found the last piece of the puzzle by yourselft. At the end, when you finish migrating, you replace the .yml with the old one and restart the service. See if it works. Cheers. |
|
|
Finally I have it back! The full sequence: |
|
|
Congrats! Great work! |
|
|
Nice! I’m glad to hear this. Thanks for posting all the steps. I’m sure this post will be helpful for other BitNami Redmine users. |
|
|
RE: Step 31 Copy the old apps\Redmine\config\database.yml and email.yml (don’t copy settings.yml) |
|
|
All I can say is this is what I had to do to get it to work – it took over a week to go through all the permutations! Maybe Giodano or beltan can answer you better. |
|
|
@tompierce Yes, you are right. |
|
|
Thanks guys! |

