Project

General

Profile

Actions

Feature #3125

open

Merging 2 different Redmine Installations

Added by Ashwin Muni almost 15 years ago. Updated about 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
2009-04-06
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

I have redmine installed in 2 systems A and B.

Redmine Specs
Version : 0.8.0

I want both the redmine version to be merged to one now. Does redmine has any such feature where i can merge the database from other redmine installation or location.

Redmine A                       Redmine B
IP 192.168.1.1 IP 192.168.1.100
Want both to merge

So that the results would be

Redmine ( A + B )  = Redmine (Final)

Please provide me the soln.

Ashwin


Files

migrate.txt (6.47 KB) migrate.txt General migration.. Kiall Mac Innes, 2009-04-29 15:08
migrate2 (1.18 KB) migrate2 Merging 2 user accounts after the migration... Kiall Mac Innes, 2009-04-29 15:08
Actions #1

Updated by Jean-Philippe Lang almost 15 years ago

Sorry, there's no such feature.

Actions #2

Updated by Kiall Mac Innes almost 15 years ago

I recently merged a trac and redmine database in a way that may work for you..

Basically - i used the trac importer to create a redmine DB from the trac one. then the existing redmine DB was merged into this new one..

See the attached SQL queries as a base for what your going to need to to on the "to be deleted db" - after all these queries, you can export the data from the old db, and just insert them into the new one..

Aka - Pick one of your existing installs to the the final one and merge the other DB into it ...

The queries i used DO NOT COVER all circumstances - we has been using a limited set of trac features and a limited set of redmine features... You'll need to add more queries...!

Actions #3

Updated by Kiall Mac Innes almost 15 years ago

Note... all those numbers in the queries represent the MAX from the corresponding table from the DB u pick as the "final one" ...

Eg all the 380's in the "//User IDs" section are because on the "final db" "SELECT MAX AS max FROM users" returns 380...

Good luck - its not easy.

Actions #4

Updated by Zarooba Rozruba almost 15 years ago

A warnings : if you have anywhere references to ticket numbers, in text as opposed to db schema based link, then it will start pointing to a wrong location.

For example:

redmine a : commit comment : closes # 123
redmine b : commit comment : closes # 123

When merged, commit comments will stay intact, while one of them will have their tickets renumbered. This will cause some confusion.

If I can bring up my own related need : see ticket #3087

Actions #5

Updated by Chris Born almost 15 years ago

This very closely relates to a forum post I made just yesterday about moving a single project from one Redmine install to another. I began looking at the DB to see what it would take, then just ran across this. I was thinking of a possible solution for this being a project export/import feature. This would be really helpful, either project based merger or full Redmine install.

Actions #6

Updated by Eric Davis over 14 years ago

  • Priority changed from Urgent to Normal

I just recently completed a plugin that will let you merge two Redmine database together. It worked for my customer, but I need to add some documentation before I can create a release of it. If you're interested, it's located at http://github.com/edavis10/redmine_merge_redmine

Actions #7

Updated by Christian Rodriguez about 10 years ago

I updated Eric Davis plugin to be compatible with current redmine version. Source code (until pull request is accepted) is located at https://github.com/chrodriguez/redmine_merge_redmine

Actions #8

Updated by Baris Demiray over 9 years ago

Hi all,

First of all, thanks to those who contributed the scripts!

I was just using Christian's version and I had problems with clashing project indexes, which was expected, so I updated project_id values in all the tables so that they would not clash, but then now I'm having the error below,

PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "projects_trackers_unique" 
DETAIL:  Key (project_id, tracker_id)=(4, 1) already exists.
: INSERT INTO "projects_trackers" ("project_id", "tracker_id") VALUES (4, 1)

Tasks: TOP => redmine:merge_redmine
(See full trace by running task with --trace)

Apparently, tracker_id field is now unique in recent versions of Redmine, which is not the case at all in older database (as there are tracker_ids 1 to 4 for every single project_id). Am I missing something?

Some information,
Source Redmine: v1.2.0 (SQLite) # I converted SQLite to PostgreSQL as described in 2.2 of http://vault-tec.info/post/68670739052/installing-migrating-upgrading-redmine-with-ldap-on.
Destination Redmine: v2.5.2 (PostgreSQL)

Thanks in advance,

Cheers,

Actions #9

Updated by Arthur Andersen over 8 years ago

For anyone who's trying to accomplish the same thing.
I updated the merge plugin to work with Redmine 3.0.

With this I was able to merge 2.3 and 2.5 into an up-to-date 3.0 database.
Simply migrate each redmine database to the latest version and run the plugins merge task.

https://github.com/leoc/redmine_merge_redmine

Thank you for all the work that you put into this!

Actions #10

Updated by David Chen about 6 years ago

M R Arthur Andersen

Now that the version to upgraded to version 3.4.4, my question is whether or not the scripts still can work for it? Your reply will be highly appreciatedly.

Actions

Also available in: Atom PDF