• MySQL & OpenKM Backup Info

  • Problems with installing OpenKM? No problemo, the solution is closer than you think.
Problems with installing OpenKM? No problemo, the solution is closer than you think.
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.
 #39604  by gwaitsi
 
I have OpenKM 6.3 working on OpenMediaVault NAS server with MySQL as the db engine.

The mysqldata directory has ibdata1 file of 622Mb.
I use the following Backup commands for MySQL
Code: Select all
# Perform the database dump and compression
echo "Dumping MySQL databases..." >> "$LOGFILE"
mysqldump --user=$user --password=$password --single-transaction --events --all-databases > $backup_path/$dbname-$date.sql

echo "Compressing database backup..." >> "$LOGFILE"
bzip2 $backup_path/$dbname-$date.sql
chmod 600 $backup_path/$dbname-$date.sql.bz2
the file size after the above commands is only 60Mb, can this be right?

I also backup the OpenKM repository with the following commands.
Code: Select all
# Synchronise directories ...
echo "Please wait, syncing </media/a7e96974-7965-4103-9743-281802f3d956//openkm> to </media/854fe912-9f08-423d-9bc8-26a404cae6d0/openkm> ...\n"
rsync --verbose --log-file="/var/log/rsync.log" --recursive --times --archive --delete --perms --acls --xattrs "/media/a7e96974-7965-4103-9743-281802f3d956//openkm/" "/media/854fe912-9f08-423d-9bc8-26a404cae6d0/openkm" & wait $!
Are the two things above sufficient to ensure a fullbackup on a daily basis?
The OpenKM system install should be covered by the weekly backup i do.

thanks for the advice
 #39619  by jllort
 
Yes rsync is enought, but I suggest something like rdiff-backup ( incremental backup ). With rsync you get the increment, but I think you can not restore backup two days or three old, with rdiff-backup you can do it.

About database seems right, anyway see this backup script:
http://wiki.openkm.com/index.php/Backup ... -_MySQL.29
Code: Select all
mysqldump -h localhost -u root -pXXXXX okmdb > mysql_okmdb.sql
I don't know the advantage of using --single-transaction --events, but seems right

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.