Date: Tue, 24 Oct 2017 00:13:23 -0500 From: Paul Schmehl <pschmehl_lists@tx.rr.com> To: freebsd-questions@freebsd.org Subject: Re: Strange periodic problem Message-ID: <ECF9242E2CBCB304283A6AD9@Pauls-MacBook-Pro.local> In-Reply-To: <37900d35-8059-d0af-f392-a44042c5f4f9@gmail.com> References: <99E0408A95C01319659D7EFF@Pauls-MacBook-Pro.local> <37900d35-8059-d0af-f392-a44042c5f4f9@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--On October 24, 2017 at 12:22:06 AM -0400 zep <zgreenfelder@gmail.com>=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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ECF9242E2CBCB304283A6AD9>