NYCPHP Meetup

NYPHP.org

[nycphp-talk] [ot] mysqldump cron problem

Andrew Yochum andrew at plexpod.com
Sun Feb 19 08:19:58 EST 2006


Hans Kaspersetz wrote:
> I created a bash script that is supposed to dump one of my databases.  
> When I run the bash script from the cli it dumps no problem.  When I 
> call the script from cron, I get an empty file in the destination 
> directory.  Anyone have any ideas?
> 
> FreeBSD 5.3
> MySQL 4.1
> 
> --------------------------------
> #!/usr/local/bin/bash
> path="/usr/local/backups/"
> 
> date=`date +"%y%m%d-%H%M%S"`
> filename=$path$date"-oncellrx.sql"
> 
> mysqldump --opt -Q -uUSER -pPASS DATABASE > $filename
> ------------------------------------
> 
> I am calling the script as myself from cron.  Bash is set as my shell in 
> passwd.  Seems sorta mysterious to me.
> 
> Hans

Have you checked your user's mail spool for any output from the cron?

Andrew

-- 
Andrew Yochum
Plexpod
andrew at plexpod.com
718-360-0879



More information about the talk mailing list