From owner-freebsd-questions@FreeBSD.ORG Fri Jan 30 19:28:52 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 541E9106564A for ; Fri, 30 Jan 2009 19:28:52 +0000 (UTC) (envelope-from peter@boosten.org) Received: from smtpq3.tb.mail.iss.as9143.net (smtpq3.tb.mail.iss.as9143.net [212.54.42.166]) by mx1.freebsd.org (Postfix) with ESMTP id DB5118FC19 for ; Fri, 30 Jan 2009 19:28:51 +0000 (UTC) (envelope-from peter@boosten.org) Received: from [212.54.42.139] (helo=smtp8.tb.mail.iss.as9143.net) by smtpq3.tb.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1LSz2o-0001hj-Ni; Fri, 30 Jan 2009 20:28:50 +0100 Received: from [84.25.72.219] (helo=ra.egypt.nl) by smtp8.tb.mail.iss.as9143.net with esmtp (Exim 4.69) (envelope-from ) id 1LSz2n-0004o6-Md; Fri, 30 Jan 2009 20:28:49 +0100 Received: from [127.0.0.1] (xp.egypt.nl [192.168.13.35]) by ra.egypt.nl (Postfix) with ESMTP id B7DFC39841; Fri, 30 Jan 2009 20:28:48 +0100 (CET) Message-ID: <498354F0.6050000@boosten.org> Date: Fri, 30 Jan 2009 20:28:48 +0100 From: Peter Boosten User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: drcubi@yahoo.com References: <229610.47419.qm@web51408.mail.re2.yahoo.com> In-Reply-To: <229610.47419.qm@web51408.mail.re2.yahoo.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-ZiggoSMTP-MailScanner-Information: Please contact the ISP for more information X-ZiggoSMTP-MailScanner-ID: 1LSz2n-0004o6-Md X-ZiggoSMTP-MailScanner: Found to be clean X-ZiggoSMTP-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-1.413, required 5, BAYES_00 -2.60, CM_META_TB_NOARR 0.50, SPF_NEUTRAL 0.69) X-ZiggoSMTP-MailScanner-From: peter@boosten.org X-Spam-Status: No Cc: freebsd-questions@freebsd.org Subject: Re: Backup to spare drive (rsync / crontab) 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: Fri, 30 Jan 2009 19:28:52 -0000 drcubi@yahoo.com wrote: > I am using rsync and crontab to perform scheduled backups on FreeBSD AMD64 Rel. 7.0 > I am following process described here for rsync : > http://samba.anu.edu.au/rsync/examples.html > > I have a backup script's created for daily, weekly, monthly. > This is one example - the daily (/backup is a seperate physical drive) : > > #daily backup script > rsync -a --delete /usr/home/data/Access/ /backup/daily/Access > rsync -a --delete /usr/home/data/Templates/ /backup/daily/Templates > rsync -a --delete /usr/home/QBdata/ /backup/daily/QBdata > rsync -a --delete /usr/home/reception1/ /backup/daily/reception1 > rsync -a --delete /usr/home/reception2/ /backup/daily/reception2 > rsync -a --delete /usr/home/reception3/ /backup/daily/reception3 > rsync -a --delete /usr/home/data/Files/ /backup/daily/Files > > All files created where chmod'd with +x, then I test the scripts by running them manually and all three, daily, weekly & monthly work fine. > > FInal step, I add to root crontab, by using : > > crontab -e > > I added following lines : > > 1 23 30 * * /usr/local/sbin/backup/monthly > 1 21 * * 0 /usr/local/sbin/backup/weekly > 1 23 * * 1-5 /usr/local/sbin/backup/daily > > crontab -l shows all is OK as well. > > But the scheduled backups never happen. I must be doing something wrong, but can't figure out what. > rsync isn't in the path of cron. You should either provide the complete path in the script, of add /usr/local/bin to your crontab. Peter -- http://www.boosten.org