Export/Import MySQL project
Greetings - brand new user here and thx to the folks that have put this project together.
I've been part of a dev project that was hosted on someone else's box - I'd now like to move that project's files to my own install - built using the BitNami stack. Since BitNami and the site currently serving the project in question we are thinking it should be a very straight-forward exchange of files. Any particular things to watch out for as we start attempts?
RE: Export/Import MySQL project - Added by phillip rhodes about 11 years ago
make sure you are running same version of redmine on both, schema changes can happen between versions.
RE: Export/Import MySQL project - Added by Steve Hueners about 11 years ago
Info on the destination server says:
Redmine 0.8.4.stable (MySQL)
while on the existing server it's:
Redmine 0.8.4.stable.2798 (MySQL)
Is that enough of a difference to force me to upgrade the destination server? Feel free to infer from the fact that I used the BitNami stack that I'm not well versed in administering Ruby apps.
RE: Export/Import MySQL project - Added by Milos Zikic about 11 years ago
Overall it would be nice to have some Project import/export ability so we can extract all the project data from one server and put it into another.
This is not a common task but sometimes there are some migrations that need to occur and this feature will be nice to have.
RE: Export/Import MySQL project - Added by Paul Read over 10 years ago
Is there a web page/documentation some where describing how to export one project from one Redmine instance to another one? (I do see the need to have the Redmine instances at the same version but what else do I need to do?)
RE: Export/Import MySQL project - Added by Matthias Neubert almost 10 years ago
+1 Indeed this is an realy needed feature!
I googled around and I simply did not find a save way to export a project (with all its tickets and used users and all) and import it into an other redmine instance.
attached files are no problem since one can copy the folder where they are placed. More interesting would be a solution for creating sql script for importing into the target redmine datebase.
so any ideas?
RE: Export/Import MySQL project - Added by Bruno Medeiros almost 10 years ago
I needed to do that with a project in my company. All I can say is that it is a really difficult task. I made some PDI transformations that migrate all tickets from one project in one instance to another instance. Obviously it ignores some info, is impossible to migrate everything without lost some data.
Main problems found:
- Ticket's ids will change, and all mentions using #NNNN notation will be broken.
- Categories, custom field, etc will be lost
- users on different instances can have different ids
- Redmine have a lot of references without FK
I've attached my .ktr a .kjb files, just in case someone want to adapt them. Steps to do:
- Create a project on the target redmine
- Learn PDI (former kettle) basics on the web if you don't know about it
- Download all .ktr and .kjb files in the same directory
- Open the files on spoon and try to understand what I did (I see if it is what you really want)
- Change the database info to your databases
- Check all table inputs for hardcoded data and change to match yours
- Run temp.sql in some temp database and configure it on transformations
- Run the .kjb file inside spoon
Be aware of:
- I ignored custom fields, categories and versions in migration. You'll need to improve the transformations of you want it.
- Users should exist in both redmine instances (can have different ids, the migration will be based on login)
- You'll need no move attachment physical files manually
- Trackers, statuses, priorities, etc should be the same in both instances
- Some journal info will be lost
I recommend you to run it on a test environment first and see what happens. DON'T RUN it directly on you production environment.
load-attachment.ktr - transformation to load attachments (12.6 KB)
load-journal.ktr - transformation to load journals (11.7 KB)
load-journal-detail.ktr - transformation to load journals details (23.2 KB)
table_from_to.sql - script to create temporary tables (701 Bytes)
ticket-migration.kjb - job to run all transformations in the right sequence (12.3 KB)
load-users.ktr - transformation to load users to temp table (10.5 KB)
load-tickets.ktr - transformation to load tickets (14.8 KB)
load-relation.ktr - transformation to load relations between tickets (10.3 KB)
RE: Export/Import MySQL project - Added by Ryan Cross over 9 years ago
see also http://www.redmine.org/issues/3647