Do we need to run db:migrate TWO times when migrating Redmine from one computer to another?
I wish to migrate Redmine from one computer to another. I could do some hit and trial and do this task,however I wish to confirm if my method was correct.
I am using Redmine-4.1.1 on a Debian 10 computer with rvm ruby-2.6.5.
I am referring to this guide:-
The above says :-
We assume you already have a running Redmine on the New machine with a virgin database.
Import the saved database into Redmine, then migrate the database and restart Redmine:
- cd /root/redmine
- ./redmine_bak --restore
- cd /usr/share/redmine
- rake db:migrate RAILS_ENV=production
- touch /usr/share/redmine/tmp/restart.txt
My query is : To have a running Redmine I would have to setup Redmine as mentioned here:
I did the following steps, except the last one( redmine:load_default_data)
bundle exec rake generate_secret_token
RAILS_ENV=production bundle exec rake db:migrate
RAILS_ENV=production bundle exec rake redmine:load_default_data
So my query is : we have to run db:migrate TWO times to migrate redmine. 1. To setup the blank database and 2. to migrate the old data.
Do I understand correctly?
RE: Do we need to run db:migrate TWO times when migrating Redmine from one computer to another? - Added by Bernhard Rohloff about 1 year ago
AFAIK the db:migrate step is only needed if you also upgrade your Redmine version while moving it to another machine.
It has nothing to do with the migration of the application itself. As you already have version 4.1.1 installed I think there's no need for it.
Installing Redmine on your new machine and moving your old database to it is all you need to do in this regard. Although you could setup a new database on your new machine just to see if the installation is working, but this is an optional step.
RE: Do we need to run db:migrate TWO times when migrating Redmine from one computer to another? - Added by Ashim Kapoor about 1 year ago
OK. Seems like I have misunderstood what db:migrate does.