Unify several sites in one

Hello, I have a big problem in my hands…

I was asked to migrate 3 different sites (servers), with different versions, to one unique “global” site, containing all journals and related stuff.
I should probably upgrade all 3 sites to 2.4.6 (current latest version) using “/tools/upgrade.php” facility before managing to unify public and database data.
Do you guys know if there’s any easy way to accomplish this task? I mean, merge public and database data, respecting all database primary/unique keys and reflect those keys in uploaded files.

Best regards.

There is not currently a procedure for merging independent OJS sites into a single install. You can import Issues and Articles using the Native Import/Export plugin, but this leaves behind the journal configuration, workflow, usage statistics, etc. A tool for this (mysql only) was started during last year’s PKP Sprint, but never completed. This is currently on the development plan for the Pitt ULS, but not prioritized (yet).

If moving to a single server with multiple OJS installs is OK, there is a straightforward way to accomplish that with Apache virtualhosts.

Hi ctgraham,

Thank you so much for the precious information. Now that I know no tool is available, I should better start programming (mysql) my way out.

Best regards.

Let us know how you make out, and whether you end up with a working prototype of the code to do this.

Our earlier strategy (IIRC) was to dump the source system’s database as xml with mysqldump, and then to traverse the structure from the journal downward, recursively looking for foreign keys. N.b.: Some foreign key names are masked as assoc_id / assoc_type columns. The plan was to then to rewrite the dumpfile with keys incremented so as to not conflict with existing data in the target system.

@asmecher was working on a different strategy, I believe, and may have other suggestions or incomplete code.

Hi all,

We tinkered with this at our last sprint but didn’t manage anything definitive. Our summary notes are here.

I do have some source code but it’s been long enough since I looked at it that I won’t be a tremendous amount of help in explaining it.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

We, from Lepidus, developed a plugin for IBICT for importing and exporting journals from one install to another.

It is a working prototype, therefore there surely is room for improvement.

It supports the following requirements in your document:
- Merge an external journal into an existing install
- History; workflow; journal setup; everything is fully required; adding something additional is not sufficient.

There are some limitations though:
- The plugin does not support the migration of data stored by plugins in custom tables
- Plugins are not migrated. Therefore if the journal is using a theme plugins that is not available in the target install the theme must be adjusted.
- If the installs use different password hashing configurations (md5 vs sha1), newly imported users won’t be able to login. They need to use the password recovery procedure to login in the new install.

It is available in our github: https://github.com/lepidus/fullJournalTransfer

@amenegazzi, you may try to use our plugin. It is an import/export plugin. For installing you may clone it to the plugins/importexport folder of your installs.

Its use is very simple.

For exporting:
> php importExport.php FullJournalImportExportPlugin export <filename>.tar.gz <journalPath>
For importing:
> php importExport.php FullJournalImportExportPlugin import <filename>.tar.gz

The plugin has a GUI support, but I don’t recommend to use due to possible timeouts or memory restrictions in php.

Let us know if it works for you. If you have any trouble using it, feel free to contact us.

Note: If the path is already in use in the target install a number will be appended to it (eg. myJournal will be imported as myJournal1).

Regards,
Diego Abadan - Lepidus Tecnologia
Periódicos em Nuvens

4 Likes

Olá @abadan,

Legal demais o plugin. :smile: Mais legal ainda você ter compartilhado com a comunidade. Parabéns!

I read the code a little bit and it seems that the plugin client method expects a journal path parameter. So I think that the usage for exporting would be:

php importExport.php FullJournalImportExportPlugin export .tar.gz journalPath

Correct if I’m wrong, I didn’t tested.

Congrats again, it seems really helpful.

Cheers,
Bruno

Hi @beghelli,

Para este plugin o maior mérito é do IBICT que bancou desde o início como sendo Software Livre como colaboração com a comunidade SEER / OJS. :smile:

Correct! The forum cut a piece and did not see, sorry.

php importExport.php FullJournalImportExportPlugin export  <journalExportFile.tar.gz>  <journalPath>

Cheers,
Diego Abadan - Lepidus Tecnologia
Periódicos em Nuvens

Hi everyone!
plugin fullJournalTransfer is not available for OJS 3.x, I’m not sure if any of the plugins in tools/import/export is usefull for this task. Can anyone help me with some link to a pugin, or manual pages?

I must unify lots of journals from lots of independient installations in one installation of OJS.

thank you!

sds, Nicolás.