Page 1 of 1

Cleanup okm preserving configurations

PostPosted:Mon May 06, 2013 1:11 pm
by quelo1972
I have installed OpenKM 6.2.4-DEV (build: 8003), how can I cleanup my installation from all document and data obtaining a fresh situation but preserving all the configurations?
Thanks in advance.

Re: Cleanup okm preserving configurations

PostPosted:Tue May 07, 2013 11:46 am
by pavila
You can delete all documents from the repository or make some SQL delete to empty tables. The best (and more safe way) is setting hibernate.hbm2ddl to create.

Re: Cleanup okm preserving configurations

PostPosted:Tue May 07, 2013 4:16 pm
by jllort
In administration -> configuration you can export configuration parameters ( I think is want you want no ? ).
Then you should make some script to export users and roles, something like it:
Code: Select all
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;