Hi Alll,
First post here. What I want to do is schedule cron on a shared server to once a day copy my mysql database and sugarcrm folder to backup folders. I have been so far unsuccessful so perhaps you could help. Here is what I have so far:
01 00 * * * mysqldump --opt -u[user] -[password] [database] > /backup/db/sugarce_backup_current.sql;mv /backup/db/sugarce_backup_current.sql /backup/db/$(date +%m%d%Ysugarce_backup.sql);gzip -f /backup/db/$(date +%m%d%Ysugarce_backup.sql);
45 00 * * * cp -rf /public_html/sugarcrm /backup/apps/sugarce;tar -cf /backup/apps/sugarce.tar /backup/apps/sugarce;rm -rf /backup/apps/sugarce;gzip -f /backup/apps/sugarce.tar; mv /backup/apps/sugarce.tar.gz /backup/apps/$(date +%m%d%Ysugarce_backup.tar.gz);
here is the error I am getting emailed to me from both cron jobs:
/bin/sh: -c: line 0: unexpected EOF while looking for matching `)'
/bin/sh: -c: line 1: syntax error: unexpected end of file
Now I have them set up as 2 separate cron jobs. Is this the problem? any help here? I am very new to this. I found this code somewhere on the forums but I didn't know if I should resurrect an ancient thread. Sorry if I should have.
Thanks in advance


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks