Merging 2 different Redmine Installations
I have redmine installed in 2 systems A and B.
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.
Updated by Kiall Mac Innes over 14 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...!
Updated by Kiall Mac Innes over 14 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.
Updated by Zarooba Rozruba over 14 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.
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
Updated by Chris Born over 14 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.
Updated by Eric Davis almost 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
Updated by Christian Rodriguez almost 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
Updated by Baris Demiray about 9 years ago
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?
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,
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.
Thank you for all the work that you put into this!