From owner-freebsd-questions@freebsd.org Tue Oct 24 05:10:50 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F337E3F6B2 for ; Tue, 24 Oct 2017 05:10:50 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from dnvrco-cmomta03.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 212E47014E for ; Tue, 24 Oct 2017 05:10:49 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from [192.168.0.11] ([76.183.153.52]) by cmsmtp with ESMTPA id 6rU7eF28ne8Ia6rUAeVt5n; Tue, 24 Oct 2017 05:10:43 +0000 Date: Tue, 24 Oct 2017 00:10:39 -0500 From: Paul Schmehl Reply-To: Paul Schmehl To: Adam Vande More cc: FreeBSD Questions Subject: Re: Strange periodic problem Message-ID: <4E78133D6588A3580F02D8D1@Pauls-MacBook-Pro.local> In-Reply-To: References: <99E0408A95C01319659D7EFF@Pauls-MacBook-Pro.local> X-Mailer: Mulberry/4.0.8 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-CMAE-Envelope: MS4wfJrX3for4XyJaxGeLT24URVCxW+ehFcVuvsI+mbRskZ+YROcK9MDh9veYKu2upCES37w9b2NucqIb6q+lbHki7e1EFDJw/jJb5ixbpBzE3MGEHy0SRwL b4kUKWg96JB5B4OMozC6bF35ZAPdmlxob/Bdvsw6B2gW2irbyOvK7TJhEjLBYvSVrvcn5nZHjPJKFAeRiuHYNZVMYBzck4zeJ43LHetNnWKGpavyFGgiayh1 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Oct 2017 05:10:50 -0000 --On October 23, 2017 at 11:02:54 PM -0500 Adam Vande More=20 wrote: > > On Mon, Oct 23, 2017 at 9:51 PM, Paul Schmehl > wrote: > > > > I wrote a script to do database backups. It worked well, so I copied it > to another server. I had to alter it, because the db was too big to send > through email, so it creates the backup, removes the previous days and > then sends email to me notifying me that it ran. Except, it doesn't work. > > And I have no idea why. > > The periodic script is executable. ># ls -lsa /etc/periodic/daily/220.dbbackup > 2 -rwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 37 Oct 19 12:31 > /etc/periodic/daily/220.dbbackup > > The script calls sh to run the actual script. ># cat /etc/periodic/daily/220.dbbackup ># !/bin/sh > /usr/local/bin/dbbackup.sh > > Periodic.conf enables the script. ># grep dbbackup /etc/periodic.conf > daily_dbbackup_enable=3D"YES" > > The script itself is executable. ># ls -lsa /usr/local/bin/dbbackup.sh > 2 -rwxr-xr-x=C2=A0 1 root=C2=A0 wheel=C2=A0 446 Oct 11 23:40 > /usr/local/bin/dbbackup.sh > > The script runs manually, and I get the email. ># /usr/local/bin/dbbackup.sh > rm: /usr/home/pauls/102217.alldb.sql: No such file or directory > > (The previous backup doesn't exist, because the script isn't running > daily.) > > What have I missed? > > > > Does the cron log indicate entry ran? No. But that was a really good question, because now that I look at it=20 *none* of the periodic scripts are running. Strange. Paul Schmehl, Retired As if it wasn't already obvious, my opinions are my own and not those of my employer. ******************************************* "It is as useless to argue with those who have renounced the use of reason as to administer medication to the dead." Thomas Jefferson "There are some ideas so wrong that only a very intelligent person could believe in them." George Orwell