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!


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

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".


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.

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

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


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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.