• Backup of files and database

  • 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.
 #29464  by matt81
 
Thanks for your reply.
I did try using the Duplicity script named "Remote backup with duplicity (Tomcat - MySQL) " in
http://wiki.openkm.com/index.php/Backup_with_duplicity

However when I execute from Cron tab I receive the following error via email:
Code: Select all
Sourced file: inline evaluation of: ``#!/bin/bash ## BEGIN CONFIG ## HOST=$(uname -n) MYSQL_PASS="PBR58Iff" OPENKM_DB= . . . '' Token Parsing Error: Lexical error at line 2, column 2. Encountered: "#" (35), after : "#":


Thanks
 #29481  by jllort
 
Quite strange, it seems that not done break lines correctly when you copied the script, take a look on it. If you're executing on Linux I suggest do not write files on Windows and then copy on lines, break lines codes are not the same and could be some problem. Take a look at file on Linux and be sure is right composed.
 #29494  by matt81
 
Thanks for your reply.
It is very strange indeed, I did copy the script from my Ubuntu 12.04 version, and I still received the error. I then removed the first three lines of code
Code: Select all
#!/bin/bash
#
## BEGIN CONFIG ##
, and it didn't throw that error any more, however it started to throw other errors.
I then started receiving the following error
Code: Select all
Parse error at line 2, column 1. Encountered: MYSQL_PASS 
I then tried to place a semi colon ; at the end of line 1 and line 2, see below:
Code: Select all
HOST=$(uname -n);
MYSQL_PASS="";
However I then received the following error:
Code: Select all
Sourced file: inline evaluation of: ``HOST=$(uname -n); MYSQL_PASS=""; OPENKM_DB="okmdb" OPENKM_HOME="/home/openkm" TO . . . '' : illegal use of undefined variable, class, or 'void' literal : at Line: 1 : in file: inline evaluation of: ``HOST=$(uname -n); MYSQL_PASS=""; OPENKM_DB="okmdb" OPENKM_HOME="/home/openkm" TO . . . '' : ) ; 
So this script is throwing errors, either I am doing something worng or this script doesn't work for Ubuntu 12.04 version. I save the file as .bsh extension as that is the only extension OpenKM accepts in order for the script to execute.

Thanks
 #29510  by matt81
 
Just an update, I tried to execute the script from Ubuntu's terminal, and it works prefectctly fine, it did a backup of the database and all of OpenKM's files.
Do you know why it doesn't work properly from OpenKM cron tab.

Thanks
 #29550  by jllort
 
Sincerally no. I suggest you use root user to schedule crontab, not openkm user. Here could be the problem.

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.