Page 1 of 1

housekeeping / backup questions :)

PostPosted:Thu Sep 15, 2011 3:41 am
by raygrrr
Hi Experts,

I wanna know what's the best way to perform housekeeping on 'old documents', I read the document for how to backup repository on: http://wiki.openkm.com/index.php/Repository_backup

But we use mysql database so I think I need to backup mysql database at the same time as well right? otherwise I assume I can't just browser the 'backup' repoistory files right?

Many thanks,
Ray

Re: housekeeping / backup questions :)

PostPosted:Mon Sep 19, 2011 2:02 pm
by jllort
Both Mysql and repository files must be done. If you only backup repository folder, you'll get blob files but you'll can not identify the name of each blob or metadata. You must backup both to have a complete repository backup and restore DMS information.

Re: housekeeping / backup questions :)

PostPosted:Tue Sep 20, 2011 10:07 am
by raygrrr
So I guess I need to stop the server then back up both repository and mysql database (or any other db), can this process be automated? coz I need to stop the server... :oops:

thxxxxxx mate

Re: housekeeping / backup questions :)

PostPosted:Thu Sep 22, 2011 1:53 pm
by Catscratch
Simply write a command line script.

1. stop okm (shutdown.sh or /etc/init.d/openkm stop)
2. backup the repository (see the repository backup guide)
3. backup mysql, e.g.
Code: Select all
VARIABLE=$(date +"%d_%m_%Y_%H_%M_%S")
mysqldump --add-drop-database --add-drop-table --databases okm_app okm_repo -uUSERNAME -pPASSWORD > okm_backup_$VARIABLE.sql
4. start okm (run.sh or /etc/init.d/openkm start)

Then create a daily cronjob which runs this script.

Re: housekeeping / backup questions :)

PostPosted:Fri Sep 23, 2011 6:06 pm
by jllort
Is as explains Catscratch, not much mistery. You can take a look at http://wiki.openkm.com/index.php/Installation_Guide and there's some information available about backup and restoring