• OpenKM database backup

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #46362  by jorseng
 
Hi Jllort,

My setup is using mysql as database, i plan to write a simple script to "mysql_dump" the sql image daily.
Is it sufficient to just backup the sql file for restore or do i need to also backup the repository folder?

What are the options to create a backup image daily in openkm?

Regards,
 #46367  by dferguson
 
I have deployed this example...

https://docs.openkm.com/kcenter/view/ok ... rsync.html

but have added a full zip/tar of the entire tomcat folder, which includes all the configuration, property group, workflow, and report files unique to my deployment.

I do this nightly off a crontab job and write the output to a log file. I am not sure if the dump is better than archiving the entire folder from a data perscpective.
 #46369  by jorseng
 
Hi dferguson,

Thanks for your suggestion! There is a part which i would like to understand in regards to database, if i am using [h2] database then i am certain that i can just zip the folder and store it as backup as the image itself is stored in the tomcat folder.

As for mysql, the sql image is stored in the local machine and the repository files in the tomcat folder. So if I only backup the tomcat folder wouldn't i be missing an important part of the database?

My priority for the backup is just the data itself, because the tomcat folder with all the configuration and setups will be constant for a long while and its backup does not need a nightly copy.

The data however is written everyday, and once the files are uploaded to the system, it will be removed from the local machine after some time. Thus it is crucial to ensure the data uploaded to the system can be recovered no matter what.

My question is, in order to retain full recovery, do i need both repository folder AND sql image?
 #46389  by redink
 
Hi jorseng,

yes, you need to back up both SQL and data repository. OpenKM does not store the files as BLOBs in SQL but in the data directory using the UUID.
 #46401  by jllort
 
Good practice is restore the backup into another server to check everything goes right. After restore the backup go to Administration > Tools > repository checker to verify the data integrity.

As said the previous user, you must backup the database and datastore folder. I suggest backup database and entire tomcat folder ( where usually into you have the repository folder ) and from this scenario you can quickly restore full application.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.