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:”Generate users and roles SQL scripts
Section titled “Generate users and roles SQL scripts”From HSQLDB
Section titled “From HSQLDB”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;From MySQL
Section titled “From MySQL”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.
Export Metadata
Section titled “Export Metadata”- Click top right
Edit metadata. - In Edit view, copy the XML.
Export crontab
Section titled “Export crontab”- Go to Administration > Crontab > Download
Export the repository
Section titled “Export the repository”- 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

Installation of OpenKM
Section titled “Installation of OpenKM”Make a new Installation with the new database server.
Import the repository
Section titled “Import the repository ”- 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 scripts
Section titled “Execute scripts”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.
Restore configuration parameters
Section titled “Restore configuration parameters”- Go to Administration > Configuration parameters
- Go to bottom page.
- Select configuration parameter SQL file.
- Click
Import button.
Restore metadata
Section titled “Restore metadata”- 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.
Restore crontab task
Section titled “Restore crontab task”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.