Automatic Database Migration Process

Help us to improve OpenKM! Be part of the Open Source Community.
Forum rules
Please, before asking something see the documentation wiki or use the forum search function.
Post Reply
Phoenix880
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Thu Jun 21, 2018 2:50 pm

Automatic Database Migration Process

Post by Phoenix880 » Thu Jun 21, 2018 3:00 pm

Hi!

To upgrade OpenKM, it is currently necessary to run manual SQL and "Java Code" scripts. To run Open KM with Docker in a fully automated cloud environment, I need an automatic migration.

Are there plans to introduce a migration engine like Liquibase or Flyway into OpenKM?

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

Re: Automatic Database Migration Process

Post by jllort » Fri Jun 22, 2018 12:07 pm

Professional edition comes with tool what automatically does it, but community edition still does not have.

If Liquidbase and Flyway are relational databases supported by hibernate 3.x, then should be working now for community version. Professional version works with upper hibernate version 5.x ( that's because community is the 3-4 years ago professional version released as community, this is the way of how we release the software to the community ).

Phoenix880
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Thu Jun 21, 2018 2:50 pm

Re: Automatic Database Migration Process

Post by Phoenix880 » Fri Jun 22, 2018 2:13 pm

Where can I find further information about the migration tool in professional edition ? Which steps are reqired to migrate the database in professional edition?

Liquibase and Flyway are not relational databases but migration engines (frameworks) for databases.

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

Re: Automatic Database Migration Process

Post by jllort » Fri Jun 22, 2018 4:28 pm

If are not realtional databases then I think will not working with OpenKM now.

Phoenix880
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Thu Jun 21, 2018 2:50 pm

Re: Automatic Database Migration Process

Post by Phoenix880 » Thu Jun 28, 2018 10:44 am

Where can I find further information about the migration tool in professional edition ? Which steps are reqired to migrate the database in professional edition?

Automatic migration is an important feature for us, and a reason to switch to professional edition.

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

Re: Automatic Database Migration Process

Post by pavila » Fri Jun 29, 2018 6:08 am

In OpenKM Professional there is a tool which do the required steps to update a given OpenKM instance to a newer version. This implies SQL statements, HQL statements and BeanShell code which perform the required tasks. You just download the tool, execute it and it will download automatically the newer OpenKM release and will perform these tasks. These are the detailed steps:
  • Check if it's located at $TOMCAT_HOME folder, otherwise will raise an error message.
  • Ask for some information to the administrator.
  • Check the service configuration, the user connection and the OpenKM version.
  • If the utility is successful on these checks, it will require confirmation by the user to proceed with upgrade [y/N].
  • Download the new OpenKM.war file ( current version + 1).
  • When finished downloading, it will execute pre-upgrade actions.
  • Stop OpenKM.
  • Replace the old OpenKM.war file by the new downloaded one.
  • Modify the parameter hibernate.hbm2ddl to update into the file $TOMCAT_HOME/OpenKM.cfg.
  • Start OpenKM again.
  • Check if OpenKM is already available and then execute post-upgrade actions.

Phoenix880
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Thu Jun 21, 2018 2:50 pm

Re: Automatic Database Migration Process

Post by Phoenix880 » Mon Jul 02, 2018 7:15 am

We run OpenKM in a Docker Container with the official OpenKM Image:
https://hub.docker.com/r/openkm/openkm/

1. Is there a Docker Image for Professional Edition too ?

2. When using Docker, you do not need to download a war file but only update the Docker image.
How does the OpenKM Migrations Tool work together with Docker ?

3. Is it possible to run the migration tool without user interactions ?

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

Re: Automatic Database Migration Process

Post by jllort » Tue Jul 03, 2018 7:33 am

Please add the docker question into another forum post.

shaligraminfotech
Fresh Boarder
Fresh Boarder
Posts: 1
Joined: Wed Jul 04, 2018 10:04 am
Location: 14793, Pensham Drive, Frisco. TX - 75035 USA
Contact:

Re: Automatic Database Migration Process

Post by shaligraminfotech » Wed Jul 04, 2018 10:11 am

hi
fantastic information provide about automatic database migration process

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest