Joseph Simmons wrote:
I added the full path and the result didn't change. I can still see it
running in the log but the script doesn't appear to be doing anything.

I have the following variables set in the root's crontab

SHELL=/usr/local/bin/bash
PATH=/etc:/bin:/sbin:/usr/bin:/usr/sbin
HOME=/root

The file I'd like to execuate has the following permissions

rwxr-x---

it's own by root, the contents of the file are below

#!/usr/local/bin/bash
date_time=$(/bin/date "+%Y-%m-%d-%H-%M-%S")

/usr/local/bin/mysqldump -u backup_user -pPassWord DataBase
/backup/db/DataBase-$date_time


I run the same script, however without the credentials. Those are in ~/.my.cnf

[client]
user = backupuser
password = thepassword
host = the.host.name

my backup script:

*******
ra% cat bkupdb
#!/bin/sh

DATUM=`date +%Y%m%d`

nice -19 /usr/local/bin/mysqldump -A --single-transaction > /home/peter/backup/mysql-${DATUM}.sql
gzip /home/peter/backup/mysql-${DATUM}.sql
******

nb: DATUM = Dutch for date

Peter

--
http://www.boosten.org

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"

Reply via email to