Merging two repositories

We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules
Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
Post Reply
openkm_user
Expert Boarder
Expert Boarder
Posts: 113
Joined: Thu Dec 17, 2015 7:38 am

Merging two repositories

Post by openkm_user » Sun Mar 19, 2017 2:50 pm

Hi,

We have 2 instances of tomcat, we started with bundled tomcat and have documents in that repository. But due to the compliance we follow we installed another newer version of tomcat and started importing documents in there now. So we have 2 repositories and would like to have repo from bundled tomcat in the newer tomcat. I think we will not have any problem restoring datastore but how to do the index?

Thanks in advance!
Production Configuration: OpenKM Community 6.3.3 | Windows Server 2012 | Intel (R) Xeon (R) CPU E5-2670 2.60GHz | RAM: 50GB | 16 Core | MySQL 5.7.14 | Virtualized

jllort
Moderator
Moderator
Posts: 9380
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Merging two repositories

Post by jllort » Mon Mar 20, 2017 9:22 am

Migration between two OpenKM ? or migrate only the tomcat version ?

openkm_user
Expert Boarder
Expert Boarder
Posts: 113
Joined: Thu Dec 17, 2015 7:38 am

Re: Merging two repositories

Post by openkm_user » Mon Mar 20, 2017 11:31 am

Let me try and explain.

We started off with the openkm bundled tomcat version and the client imported about 250,000 documents in this instance.
Our client forced us to upgrade to tomcat 8.x due to compliance reasons. We spun up an 8.x instance of tomcat and then the client imported about 100,000 documents in this 8.x version. However we ran into a bug in this 8.x version and had to roll back to a 7.0.59 apache tomcat version which satisfies the client compliance and also overcomes the 8.x bug.

Now we want to take the 250K documents that sit in the bundled tomcat, the 100K 8.x tomcat and merge it into the 7.0.59 version that we are currently running.

I believe we can merge the datastore folder without conflicts because the folders and filenames will be unique. or are we mistaken?

But what about the indexes? Is there any way to just recreate the indexes after merging the datastore folders?

Thank you
Production Configuration: OpenKM Community 6.3.3 | Windows Server 2012 | Intel (R) Xeon (R) CPU E5-2670 2.60GHz | RAM: 50GB | 16 Core | MySQL 5.7.14 | Virtualized

jllort
Moderator
Moderator
Posts: 9380
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Merging two repositories

Post by jllort » Tue Mar 21, 2017 7:09 pm

Not possible this kind of merge, you are forgetting the database data. In this scenario will be necessary export and import. What is possible is migrate the repository from one tomcat to another, but what is not possible is to merge two distinct repositories.

pavila
Moderator
Moderator
Posts: 3011
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: Merging two repositories

Post by pavila » Wed Mar 22, 2017 6:11 am

Documents and folders are unique and it's pretty sure you won't have collisions. The process would be this:

* Export the old OpenKM repository (Administration > Repository export)
* Copy the exported repository to the new location
* Import the documents into a new folder in the new OpenKM instance (Administration > Repository import)

You don't need to force a repository re-indexing.

Regards.

openkm_user
Expert Boarder
Expert Boarder
Posts: 113
Joined: Thu Dec 17, 2015 7:38 am

Re: Merging two repositories

Post by openkm_user » Wed Mar 22, 2017 1:13 pm

I am sorry but I left out one important piece of information. ALL the three tomcat instances were pointing to the same db repository EVEN THOUGH the tomcat instances were different. Our understanding is that when we import a file it is given a unique name and folder structure and stored in the repository. Then an entry is made in the db pointing to this unique name. So all the files we imported (whatever the running tomcat instance was) have entries in the db that point to a repository. The problem is that the files are in the different repository folders.

For ex: The following is the location of the repository under the various tomcats.

Tomcat --> e:/tomcat/repository
Apache 7.0.59 --> e:/Apache 7.0.59/repository
Apache 8.0.11 --> e:/Apache 8.0.11/repository

So in theory since the db entries don't store the path but only the unique file name if we MOVE the files to the repository that is in the current running tomcat it should work fine. Please correct me if I am wrong.

The only issue will then be the index. Will re-indexing fix the indexes?

Thank you!
Production Configuration: OpenKM Community 6.3.3 | Windows Server 2012 | Intel (R) Xeon (R) CPU E5-2670 2.60GHz | RAM: 50GB | 16 Core | MySQL 5.7.14 | Virtualized

pavila
Moderator
Moderator
Posts: 3011
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: Merging two repositories

Post by pavila » Wed Mar 22, 2017 1:31 pm

It's a quite mysterious installation. If you want 3 OpenKM pointing to the same DB the also have to share the document repository (GlusterFS, NFS, etc) otherwise it won't work. If you have the documents spread by the 3 OpenKM installation you can join them into a big one. You should no have collisions but a previous backup is always recommended (you know: just is case).

Regards.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests