Page 1 of 2

Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Fri Jun 24, 2011 5:57 am
by rmm
Can I ask whether it is possible to back up or save the documents in a separate computer's harddisk other than the MySQL database?
What is the best implementation of OpenKM? Save the documents in db or harddisk? Thank you for your help!

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Sat Jun 25, 2011 11:21 am
by jllort
OpenKM has tree polls.
1- One for repository structure -> that's good idea storing on dbms ( mysql is good option, until 100.000 docs could use hypersonic, default dbms that comes with openkm ).
2- One for binary files -> that's good idea storing on hard disk ( don't lose time getting from dbms, then store in temporary disk folder to expulse them from server if file is directly stored on dbms is expulsed directly), other advantage is doing incremental backups, if all is stored on dbms is not easy.
3- finally the lucene index, that might be stored on disk too.

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Thu Jun 30, 2011 1:50 am
by rmm
Hello sir, thank you for your reply.
Basically, i have used OpenKM to work with MySQL and it is running smoothly.
What if I also want to store the documents uploaded in OpenKM in another computer? Is that possible?
Do i need to create another Datastore in repository.xml?

please guide me.. thank you.
RMM

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Sat Jul 02, 2011 1:16 pm
by jllort
Are several options, but I would like understanding what do you want to solve duplicating data ... after it I could suggest some solution. The way is not modifying repository.xml etc... that's not the solution.

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Thu Jul 07, 2011 5:22 am
by rmm
Hello sir, I was thinking (sorry for this ignorant question--topic):
if the users of OpenKM would upload a document....it will be stored in MySQL.
now I also want to have a simultaneous way of storing the uploaded docs/files in the hard disk other than storing it in MySQL..

Is it possible to store the doc/files simultaneously in MySQL and in the hard disk?

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Fri Jul 08, 2011 10:15 am
by jllort
you want a mirror of the repository than have on hard disk.

It's possible and are several ways for doing it:
1- real time -> then might be implemented as extension event ( minimal extension procedure must be implemented ) take a look here http://wiki.openkm.com/index.php/Extension_Guide and here http://wiki.openkm.com/index.php/Developer_Guide
2- crontab - > create some application on cron and regreshing new files ( simple query searching new files, and then reply on some server folder )

It can be done by you or if you want we can doing it, http://www.openkm.com/Contact ( refer to this post ).

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Thu Aug 25, 2011 4:00 am
by rmm
Good day, thank you for your reply, I hope I can understand more the process on how to do it, please guide..

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Thu Aug 25, 2011 6:38 am
by jllort
Simply read the developer guide and configure development environement, then make some example extension to understanding how running it, after it you only need handle create_document event and with it you will be able to starting save process locally. Must go step by step.

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Tue Sep 06, 2011 12:56 am
by rmm
I am having a problem in checking out the source.. I have installed maven and eclipse as well as configured the plugins.. please guide. Thank you.

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Wed Sep 07, 2011 4:59 pm
by pavila
What problem do you have with the Developer Guide?

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Thu Sep 08, 2011 4:02 am
by rmm
I was having a problem in running the configurations...http://wiki.openkm.com/index.php/Debugging_with_GWT
Eclipse was deploying this warning:
Code: Select all
java.lang.NoClassDefFoundError: com/google/gwt/dev/DevMode
Caused by: java.lang.ClassNotFoundException: com.google.gwt.dev.DevMode
	at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Exception in thread "main" 
Thanks for the help.

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Fri Sep 09, 2011 2:17 pm
by pavila
Edit the pom.xml file and uncomment the gwt-dev dependency.

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Tue Sep 27, 2011 1:03 am
by rmm
there's a change of story...

openkm resides in server1
The files will be coming from server2..
i will just link the files in server2 to openkm in server1.

is this possible? Thank you.

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Wed Sep 28, 2011 10:33 am
by jllort
Change the story then add new post please.

Re: Backing up Docs in OpenKM to a Harddisk other than MySQL

PostPosted:Fri Sep 30, 2011 8:28 am
by pavila
rmm wrote:if the users of OpenKM would upload a document....it will be stored in MySQL.
now I also want to have a simultaneous way of storing the uploaded docs/files in the hard disk other than storing it in MySQL.

Is it possible to store the doc/files simultaneously in MySQL and in the hard disk?
I always recommend the use of FileDataStore because offer the best performance and ease the incremental backup process. If you wan to store in both locations you have a couple of options:

1.- Implement a CustomDataStore which store every document in database and filesystem.

2.- Create a crontab (Administration > Crontab) script which call the RepositoryExporter.exportDocuments() method to export the actual document repository contents to the server filesystem.