Technology

How to Restore Redmine Database To New Windows Server

  • Sumo

I’ve been tasked to make Redmine work on Internet Information Service (IIS) Manager version 7.5. I’ve been working intermittently on this tasks for months now. I was able to make it worked but I won’t discuss here now. Maybe if time permits, I’ll share it on another post. But after making Redmine worked on our test server, I was tasked again to migrate the Redmine database to the new Redmine instance running on IIS and Window server. This is what I am going to share on this post.

I have been trying my luck to search Mr. Google on  How to Restore Redmine Database To New Windows Server. Unfortunately, I could not find one that fits my knowledge level on Redmine and Mysql. So what I did is to device my own steps using MySql Workbence.

My assumption is you have successfully installed Redmine on IIS 7.5 running Windows Server 2008 . It is also my assumption that you have MySQL Workbench installed on the server. You see I’m not an expert on MySQL and Redmine. So this tutorial may not be the most efficient way to do this task but you may try it in case you are a newbie like me.

Here are the step by step instructions on how to restore a Redmine database to new windows server .

  1. Copy your backup file (.sql) to your destination server.
  2.  If you have an existing Redmine Database on your destination server, drop the schema. I used MySQL Workbench to do this task.
        1. Launch MySQL Workbench
        2. Connect to SQL Editor
        3. On the Object browser, right click on the Redmine database you want to drop, then click the Drop Schema
        4. On the Apply SQL Script to Database window, click the Apply button.
  3. Restore the backup file.
        1. Launch MySQL Workbench.
        2. Connect to Server Administration.
        3. On the Task and Object Browser, click the Data Import/Restore link under the Data Export/Restore section.
        4. On the Data Import/Restore window, mark the Import from Self-Contained File.
        5. Locate the backup file of the redmine database on the File Path.
        6. Select the redmine db on the Default Target Schema.
        7. Click the Start Import button.
        8. On the Import Progress tab, make sure the restore is successful

    How To Restore Redmine DB To New Server

  4. Migrate the content of the restored redmine database.
        1. Launch a command prompt window.
        2. Change the directory to the redmine directory. Issue the following command:

          rake generate_secret_token rake db:migrate RAILS_ENV=production

  5. Browse your redmine instance. You should be able to login using your old credentials and should be able to see your projects on your previous redmine instance.
  6. If you want to migrate your attachments too, simple get your files from your previous redmine instance and copy it to your new redmine instance. The location is redmine\file.

Easy peasy right? I hope this step by step instructions on how to restore Redmine Database to New Window Server help.

 

Tagged , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.