• Merging two repositories

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #43445  by openkm_user
 
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!
 #43449  by jllort
 
Migration between two OpenKM ? or migrate only the tomcat version ?
 #43451  by openkm_user
 
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
 #43459  by jllort
 
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.
 #43464  by pavila
 
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.
 #43472  by openkm_user
 
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!
 #43473  by pavila
 
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.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.