Content
You are here:
Syncing Projects between two Servers
Added by Frank Burkhardt almost 9 years ago
Hello,
sorry, maybe i´m asking a silly question, but i´m not so familar with databases etc.
We have two OP-Servers running here with many Projects on both Servers.
Is it possible to export the projects/files from one of the Servers and import them on the other one, so that we can use only one of them? Because the DB on the Server which we would use are not empty?
Many thanks and kind Regards,
Frank
Replies (3)
Hi Frank,
since nobody answered your question, I’d like to do so from my point of view.
Taking a look at the many tables, in which openproject stores its information, I don’t quite see a good chance of “importing” projects from one server to another.
I made some test by myself a few weeks ago and - honestly - you DON’T want to do that. Period. PERIOD!
It would just take a large ammount of effort to hit all the spots necessary, to REALLY get both servers working on one of them.
Just think about work packages, time lines, etc. etc. where each an every entry would require to get a new ID and a match of other IDs, that would also have to be rewritten..
You’d make your life a lot easier, if you’d just keep on using both, but only starting new projects on the server you wish to work on in future, an shut down the “old” one, once you don’t really need the data anymore..
Who ever thinks I am wrong, please feel free to intervene.. but I’d rather not do it.
Best
Oliver
Hey Frank,
Oliver already mentioned, this is possible from a technical standpoint, but restoring a complete database onto an existing one is not straightforward due to the shifts in primary keys.
As a hack if you’re experienced in Rails is to fetch all models on the old database, reset the connection to the new server and try to save them on the new one. It still involves fiddling with the primary keys, though,
but you could likely save them alongside their associations (time entries, etc.).
Best,
Oliver
Dear Oliver(both of you ;-)),
many thanks for your point of view and your answers to my question.
I think it is the best way for me, what Oliver mentioned, to work with both servers and create new projects only there etc. Because the restore process seems to comlex and time consuming for me.
Best Regards,
Frank