Ir al contenido
Otras versiones

Cargando…

How to switch between databases

Esta página aún no está disponible en tu idioma.

The process of migration between two databases can be divided into several steps:

Section titled “The process of migration between two databases can be divided into several steps:”
SELECT 'INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''' + USR_ID + ''', ''' + USR_NAME + ''', ''' + USR_PASSWORD + ''', ''' + USR_EMAIL + ''', ''' + USR_ACTIVE + ''');' FROM OKM_USER;
SELECT 'INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''' + ROL_ID + ''', ''' + ROL_ACTIVE + ''');' FROM OKM_ROLE;
SELECT 'INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''' + UR_USER + ''', ''' + UR_ROLE + ''');' FROM OKM_USER_ROLE;
SELECT CONCAT('INSERT INTO OKM_USER (USR_ID, USR_NAME, USR_PASSWORD, USR_EMAIL, USR_ACTIVE) VALUES (''', USR_ID, ''', ''', USR_NAME, ''', ''', USR_PASSWORD, ''', ''', USR_EMAIL, ''', ''', USR_ACTIVE, ''');') FROM OKM_USER;
SELECT CONCAT('INSERT INTO OKM_ROLE (ROL_ID, ROL_ACTIVE) VALUES (''', ROL_ID, ''', ''', ROL_ACTIVE, ''');') FROM OKM_ROLE;
SELECT CONCAT('INSERT INTO OKM_USER_ROLE (UR_USER, UR_ROLE) VALUES (''', UR_USER, ''', ''', UR_ROLE, ''');') FROM OKM_USER_ROLE;

Generate database configuration parameters SQL scripts

Section titled “Generate database configuration parameters SQL scripts”
  • Click at top right the Configuration parameters export icon .
  • Browser will download an SQL file with the configuration.
  • Click top right Edit metadata.
  • In Edit view, copy the XML.
  • Go to  Administration > Crontab  > Download
  • Go to  Administration > Repository export
  • Set export repository from node okm:root
  • Set file system export folder /mnt/backup/root ( you should create one folder for each principal nodes; /okm:root, /okm:categories, /okm:temples, /okm:personal, /okm:mail, /okm:trash )
  • Check metadata ( mandatory )
  • Check history ( mandatory )
  • Click on “Execute” button

Make a new Installation with the new database server.

  • Go to Administration > Tools > Repository export
  • Set import repository destination /okm:root
  • Set file system location of the exported data /mnt/backup/root
  • Check metadata and history
  • Check “Restore UUIDs”
  • Click on “Execute” button

Execute SQL script of users and roles generated at the beginning.

  • Go to Administration > Database query
  • On the bottom right choose type JDBC.
  • Write some valid SQL.
  • Click on Execute button.
  • Go to Administration > Configuration parameters 
  • Go to bottom page.
  • Select configuration parameter SQL file.
  • Click  Import button.
  • Go to Administration > Metadata 
  • Click top right Edit metadata.
  • In Edit view, paste the XML metadata definition you previously kept safe.
  • At bottom right, click Edit button.
  • At top right, click Register metadata groups to apply these changes.
  • Add groups to the profile.

If you have download Crontab task you might register them again:

  • Go to Administration > Crontab and follow the steps to register the tasks as they were in the old OpenKM.

Data what cannot be migrated and might be set again

Section titled “Data what cannot be migrated and might be set again”