2

I have multiple Redmine instances. Let's call them InstanceA and InstanceB. InstanceA and InstanceB share the same Redmine installation on Debian. Suppose I would want to install Redmine 1.3 on both instances, how would I do that?

After upgrading the core files I would have to migrate the databases. What I would like to know is: can I migrate all databases in a single action?

Normally I would do something like:

rake -s db:migrate RAILS_ENV=production X_DEBIAN_SITEID=InstanceA 

for each instance, but this would get tedious if you have 50+ instances.

Thanks in advance!

Edit:

The README.Debian file that's in the (Debian) Redmine package states:

SUPPORTS SETUP AND UPGRADES OF MULTIPLE DATABASE INSTANCES
This redmine package is designed to automatically configure database
BUT NOT the web server.
The default database instance is called "default".
A debconf facility is provided for configuring several redmine
instances. Use dpkg-reconfigure to define the instances identifiers.

But can't figure out what to do with the "debconf facility".

Edit2:

My environment is a default Debian 6.0 "Squeeze" installation with a default Redmine (aptitude install redmine) installation on a default libapache2-mod-passenger.

I have setup two instances with dpkg-reconfigure redmine.

1
  • Can you link us to a sketch of your environment?
    – voretaq7
    Nov 17, 2011 at 22:56

2 Answers 2

2

for i in $(cat file-with-instance-names-in-it) ; do rake -s db:migrate RAILS_ENV=production X_DEBIAN_SITEID=$i ; done

1
  • Can you tell us what the format of the file-with-instance-names-in-it should be please.
    – user9517
    Nov 18, 2011 at 8:28
1

I might have solved my own problem.

The command

dpkg-reconfigure --frontend=noninteractive redmine

seems to migrate all instances without user input. The command invokes:

rake db:migrate_plugins RAILS_ENV=production 

so it seems plausible that it also invokes:

rake db:migrate RAILS_ENV=production 

I succesfully migrated all Redmine 1.0 instances ("Squeeze") to 1.2 ("Wheezy").

Edit: I would like to know if this is the right way to go. Can anyone confirm that it invokes rake db:migrate?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .