It was a path problem. Fully qualifying the path to mysqldump worked. #!/usr/local/bin/bash path="/usr/local/backups/" date=`date +"%y%m%d-%H%M%S"` filename=$path$date"-foo.sql" /usr/local/bin/mysqldump --opt -Q -uUSERNAME -pPASSWORD DATABASE > $filename Thanks guys, Hans