From owner-freebsd-questions@freebsd.org Tue Oct 24 05:13:35 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 19A5CE3F971 for ; Tue, 24 Oct 2017 05:13:35 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from dnvrco-cmomta01.email.rr.com (dnvrco-outbound-snat.email.rr.com [107.14.73.231]) (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 F026C70461 for ; Tue, 24 Oct 2017 05:13:34 +0000 (UTC) (envelope-from pschmehl_lists@tx.rr.com) Received: from [192.168.0.11] ([76.183.153.52]) by cmsmtp with ESMTPA id 6rWmeP54WfblG6rWpeilVc; Tue, 24 Oct 2017 05:13:28 +0000 Date: Tue, 24 Oct 2017 00:13:23 -0500 From: Paul Schmehl Reply-To: Paul Schmehl To: freebsd-questions@freebsd.org Subject: Re: Strange periodic problem Message-ID: In-Reply-To: <37900d35-8059-d0af-f392-a44042c5f4f9@gmail.com> References: <99E0408A95C01319659D7EFF@Pauls-MacBook-Pro.local> <37900d35-8059-d0af-f392-a44042c5f4f9@gmail.com> 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: MS4wfAlZWZd3lBMkhQ5nNiKV6iBDTGhtcfa1N/VdbWcpXZv/iOXbOGfwd+V9NYzcqcfKj4vl8wcptZbLTLwzJYhRMifelBZeS5/zsieZrVRXKpHrDCnsemjP 0F12ACHvKVdj5wfEzLkYA7/qjZwq1zOcKbrPnxxj5I0hi7HbS6gE7pTIaQBSNw1SjDLjeny10k53OA== 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:13:35 -0000 --On October 24, 2017 at 12:22:06 AM -0400 zep =20 wrote: > On 10/23/2017 10: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. > > what does your /etc/crontab file look like?=C2=A0 how does it compare > between the two machines? A diff shows they are identical. >> >> 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 >> =C2=A0 > > do you get anything more useful if you change the line to sh -x to > call the .sh file?=C2=A0 is it possible there are some weird control > characters in any of those files?=C2=A0 e.g. do they still look the > same if you cat -v them? > Well, they're not the same. They're quite similar, but not the same. In=20 answering Adam's question, I now realize that NONE of the periodic scripts=20 are running. >> 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? >> >> Paul Schmehl, Retired >> >> > > what version of freebsd did it first run on?=C2=A0 what's the version of = the > new machine (or more importantly, are they at the same versions?) > Both machines are running FreeBSD 10.3-RELEASE. > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@freebsd.org" 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