Hi Guys,
So I'm having issues right now working out a backup system for my OpenKM setup. Right now I'm using this MySQL script
http://wiki.openkm.com/index.php/Backup_scripts
I'm running OpenKM Version: 6.3.1-DEV (build: 8178) on a Windows Server running Cygwin.
So basically I've tested the script and it works fine in Cygwin, but when I go to run it in the crontab it says it executes but doesn't output anything; so I ran the file in Admin > Scripting and got this error:
Sourced file: inline evaluation of: ``#!/bin/bash # ## BEGIN CONFIG ## MYSQL_PASS="password" DATABASE_EXP="/backup/lo. . . '' Token Parsing Error: Lexical error at line 2, column 2. Encountered: "\r" (13), after : "#":
http://forum.openkm.com/viewtopic.php?f=5&t=12416
So any and all advice would be so greatly appreciated! Thank you so much in advance! Happy New Years everyone
So I'm having issues right now working out a backup system for my OpenKM setup. Right now I'm using this MySQL script
http://wiki.openkm.com/index.php/Backup_scripts
I'm running OpenKM Version: 6.3.1-DEV (build: 8178) on a Windows Server running Cygwin.
So basically I've tested the script and it works fine in Cygwin, but when I go to run it in the crontab it says it executes but doesn't output anything; so I ran the file in Admin > Scripting and got this error:
Sourced file: inline evaluation of: ``#!/bin/bash # ## BEGIN CONFIG ## MYSQL_PASS="password" DATABASE_EXP="/backup/lo. . . '' Token Parsing Error: Lexical error at line 2, column 2. Encountered: "\r" (13), after : "#":
Code: Select all
I did find that this is the exact same thing that was found in this x-post but had no solution. #!/bin/bash
#
## BEGIN CONFIG ##
MYSQL_PASS="password"
DATABASE_EXP="/backup/location"
## END CONFIG ##
rm -rf $DATABASE_EXP
mkdir -p $DATABASE_EXP
# Backup de MySQL
if [ -n "$MYSQL_PASS" ]; then
MYSQL_DBS=$(mysqlshow -h localhost -u root -p$MYSQL_PASS | awk '(NR > 2) && (/[a-zA-Z0-9]+[ ]+[|]/) { print $2 }');
for DB in $MYSQL_DBS; do
if [[ $DB != "mysql" && $DB != "test" && $DB != "information_schema" && $DB != "performance_schema" ]]; then
echo "* Backuping MySQL data from $DB..."
mysqldump -h localhost -u root -p$MYSQL_PASS $DB > $DATABASE_EXP/mysql_$DB.sql
fi
done
fi
http://forum.openkm.com/viewtopic.php?f=5&t=12416
So any and all advice would be so greatly appreciated! Thank you so much in advance! Happy New Years everyone
