From owner-freebsd-questions@FreeBSD.ORG Mon Feb 23 18:41:54 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21DF81065827 for ; Mon, 23 Feb 2009 18:41:54 +0000 (UTC) (envelope-from peter@boosten.org) Received: from smtpq4.tb.mail.iss.as9143.net (smtpq4.tb.mail.iss.as9143.net [212.54.42.167]) by mx1.freebsd.org (Postfix) with ESMTP id C27C08FC23 for ; Mon, 23 Feb 2009 18:41:53 +0000 (UTC) (envelope-from peter@boosten.org) Received: from [212.54.42.146] (helo=smtp15.tb.mail.iss.as9143.net) by smtpq4.tb.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1LbfkW-00076e-DS; Mon, 23 Feb 2009 19:41:52 +0100 Received: from [84.25.72.219] (helo=ra.egypt.nl) by smtp15.tb.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1LbfkV-0000dx-AX; Mon, 23 Feb 2009 19:41:51 +0100 Received: from [192.168.13.173] (NLSTD04LJCLJZ1J.egypt.nl [192.168.13.173]) by ra.egypt.nl (Postfix) with ESMTP id 1CDE03983D; Mon, 23 Feb 2009 19:41:41 +0100 (CET) Message-ID: <49A2EDE5.8040600@boosten.org> Date: Mon, 23 Feb 2009 19:41:41 +0100 From: Peter Boosten User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Joseph Simmons References: <1ba9cd9a0902230937xc817f3dxe26a54b734d5f8ef@mail.gmail.com> <1ba9cd9a0902231026t797dd129t2b54e86bb874bbf0@mail.gmail.com> In-Reply-To: <1ba9cd9a0902231026t797dd129t2b54e86bb874bbf0@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1LbfkV-0000dx-AX X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.682, required 5, BAYES_00 -2.60, SPF_NEUTRAL 0.69, TW_PD 0.08, TW_RW 0.08, TW_WX 0.08) X-ZiggoSMTP-MailScanner-From: peter@boosten.org X-Spam-Status: No Cc: Christopher Umina , freebsd-questions@freebsd.org Subject: Re: root's crontab and mysqldump X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Feb 2009 18:41:56 -0000 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