Is there any way of merge 2 redmine database into a single one?

Added by asia zhang over 9 years ago

For example, machine A's redmine has project a,b, machine B's redmine has project c,d. Now i want to merge the 2 redmine into a single one.

how to merge the database of machine B to A, and finally we go A's redmine has both 4 projects with all information are correct?

PS:redmine version 0.7.2, use InstantRails 2.0

Replies (3)

RE: Is there any way of merge 2 redmine database into a single one? - Added by Mat Schaffer over 9 years ago

I haven't tried this myself, but if I were gonna do this I'd probably consider ar_fixtures.

It'll dump models to yaml which you could then programatically filter for duplicate id numbers then re-load into the merged database. It would take some work though. The original blog post is available at http://nubyonrails.com/articles/dump-or-slurp-yaml-reference-data. Looks like the latest is up at http://github.com/topfunky/ar_fixtures/tree.

-Mat

RE: Is there any way of merge 2 redmine database into a single one? - Added by Jean-Philippe Lang over 9 years ago

This may work for a single model, but think about associations when changing ids.

(1-3/3)