Re: [OT] cron.d entries for Amanda
On Tue, Nov 16, 2004 at 03:48:53PM +0300, Alexey I. Froloff wrote: > * Gavin Henry [041116 15:35]: > > /bin/sh: line 1: /usr/bin/find /u01/app/oracle/archdest2/* -mtime +7 -exec > > rm{}\;: > > No such file or directory > > Er... I'm not sure this will ever work. find() accepts one real > (not shell pattrn) argument for PATH. Furthermore, you may want > to use something like this: No, find will accept multiple starting points. I don't even think they have to be directories. But of course you can't decend recursively very far below an ordinary file :)) I think the shell, /bin/sh, may have been reporting the output of the find command and find was saying "no such ...". I.e. it tried to find a command "rm{}" (the curly braces are valid file name characters) and that of course was not found. As someone else noted, you need spaces. If the shell was unable to locate a command, most shells have traditionally said "not found". In intro unix or shell classes I take advantage of that particular message to emphasize the first word on a line is the command name. I let the students know that "every unix" contains a command called jimmy hoffa. And if you run the command it tells you something about him. After all the questions about one or two words or caps or ... the student run something and get a message something like: jimmy: not found which of course is true, so it does tell you something about JH. Apologies to the youngsters or non-US people who don't know JH. As most shells say something similar, i.e. "not found" vs. "no such file or directory", when they can't locate a command I think the message came from find. -- Jon H. LaBadie [EMAIL PROTECTED] JG Computing 4455 Province Line Road(609) 252-0159 Princeton, NJ 08540-4322 (609) 683-7220 (fax)
Re: [OT] cron.d entries for Amanda
"Alexey I. Froloff" <[EMAIL PROTECTED]> writes: > * Gavin Henry [041116 15:35]: >> /bin/sh: line 1: /usr/bin/find /u01/app/oracle/archdest2/* -mtime +7 -exec >> rm{}\;: >> No such file or directory > > Er... I'm not sure this will ever work. find() accepts one real > (not shell pattrn) argument for PATH. Furthermore, you may want > to use something like this: The standard find takes multiple directories for path. The shell pattern substitution in this case is done by your shell, in this case /bin/sh. -- Kevin Dalley [EMAIL PROTECTED]
[FIXED] Re: [OT] cron.d entries for Amanda [FIXED]
Dear all, You won't believe why I wasn't getting any e-mails, even though the crons were working!!! I had the -m option for amcheck to e-mail, but because everything was OK, I wasn't getting any mails. Changed to -a so everything gets sent regardless, so that way the client gets feedback everyday. How annoying simple >> >> Also there should be spaces around the braces: "... rm {} \;", but that >> should give the above error. This fixed it, cheers. -- Kind Regards, Gavin Henry. Managing Director. T +44 (0) 1467 624141 M +44 (0) 7930 323266 F +44 (0) 1224 742001 E [EMAIL PROTECTED] Open Source. Open Solutions(tm). http://www.suretecsystems.com/
Re: [OT] cron.d entries for Amanda
Paul Bijnens said: > Gavin Henry wrote: > >> /bin/sh: line 1: /usr/bin/find /u01/app/oracle/archdest2/* -mtime +7 >> -exec >> rm{}\;: >> No such file or directory > > This seems like there are quotes around the whole command, or something > with a similar effect. Maybe $IFS got screwed up when cron runs? > (run a little shell script which prints out the cron environment). > Verify you do have spaces 0x20 and not no-breakspace 0xA0 instead. Good point. > > Also there should be spaces around the braces: "... rm {} \;", but that > should give the above error. OK. > > >> P.S> I know this makes me look quite unprofessional, but I'm sure we've >> all hit some kind of stupid brick wall. "Can't see for looking", as the >> saying goes here in Scotland. > > > Yes, had it way too often :-) > > As workaround, you can create little shell scripts that are invoked by > the cron, and don't need spaces. That was my next move. > > > -- > Paul Bijnens, XplanationTel +32 16 397.511 > Technologielaan 21 bus 2, B-3001 Leuven, BELGIUMFax +32 16 397.512 > http://www.xplanation.com/ email: [EMAIL PROTECTED] > *** > * I think I've got the hang of it now: exit, ^D, ^C, ^\, ^Z, ^Q, F6, * > * quit, ZZ, :q, :q!, M-Z, ^X^C, logoff, logout, close, bye, /bye, * > * stop, end, F3, ~., ^]c, +++ ATH, disconnect, halt, abort, hangup, * > * PF4, F20, ^X^X, :D::D, KJOB, F14-f-e, F8-e, kill -1 $$, shutdown, * > * kill -9 1, Alt-F4, Ctrl-Alt-Del, AltGr-NumLock, Stop-A, ...* > * ... "Are you sure?" ... YES ... Phew ... I'm out * > *** > > >
Re: [OT] cron.d entries for Amanda
Alexey I. Froloff said: > * Gavin Henry [041116 15:35]: >> /bin/sh: line 1: /usr/bin/find /u01/app/oracle/archdest2/* -mtime +7 >> -exec >> rm{}\;: >> No such file or directory > > Er... I'm not sure this will ever work. find() accepts one real > (not shell pattrn) argument for PATH. Furthermore, you may want > to use something like this: > > find /u01/app/oracle/archdest2 -mindepth 2 -mtime +7 -delete > > mindepth is needed when you really want to search subdirecrories > inside /u01/app/oracle/archdest2 only. OK, I will check this out, thanks. > >> /bin/sh: line 1: /opt/suretec/sbin/amcheck -m learnit-dbserv-db-warm: No >> such file >> or directory > > This error message is very similar to prevoius. Are you sure > you're not quoted this line in crontab? I think I might have tried "" marks, I don't think they are needed though. > > -- > Regards, Alexey I. Froloff > AIF5-RIPN, AIF5-RIPE > --- > Inform-Mobil, Ltd. System Administrator >http://www.inform-mobil.ru/ > Tel: +7(095)504-4709, Fax: +7(095)513-1006 >
Re: [OT] cron.d entries for Amanda
* Gavin Henry [041116 15:35]: > /bin/sh: line 1: /usr/bin/find /u01/app/oracle/archdest2/* -mtime +7 -exec > rm{}\;: > No such file or directory Er... I'm not sure this will ever work. find() accepts one real (not shell pattrn) argument for PATH. Furthermore, you may want to use something like this: find /u01/app/oracle/archdest2 -mindepth 2 -mtime +7 -delete mindepth is needed when you really want to search subdirecrories inside /u01/app/oracle/archdest2 only. > /bin/sh: line 1: /opt/suretec/sbin/amcheck -m learnit-dbserv-db-warm: No > such file > or directory This error message is very similar to prevoius. Are you sure you're not quoted this line in crontab? -- Regards, Alexey I. Froloff AIF5-RIPN, AIF5-RIPE --- Inform-Mobil, Ltd. System Administrator http://www.inform-mobil.ru/ Tel: +7(095)504-4709, Fax: +7(095)513-1006 pgpQPLmD9AvJK.pgp Description: PGP signature
Re: [OT] cron.d entries for Amanda
Dave Ewart said: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Tuesday, 16.11.2004 at 12:13 +, Gavin Henry wrote: > >> Dear guys, >> >> THis simple error is doing my head in, so I'm going to ask and risk >> looking like a fool, but anyway... >> >> We normally install our Amanda crons in /etc/cron.d/suretec on client >> servers (we are using amanda and custom scripts to backup >> http://www.eems.co.uk - a very high profile 2 x SUSE Ent 8 servers). >> >> I keep getting e-mails from crond with errors, e.g. >> >> >> /bin/sh: line 1: /usr/bin/find /u01/app/oracle/archdest2/* -mtime +7 >> -exec >> rm{}\;: >> No such file or directory >> >> AND >> >> /bin/sh: line 1: /opt/suretec/sbin/amcheck -m learnit-dbserv-db-warm: No >> such file >> or directory >> >> >> My cron.d entries look like: >> >> 0 3 * * 1-5 amanda /opt/suretec/sbin/amcheck -m blah.blah >> >> >> I'm pretty so amcheck is in her path and anyway, I have defined the >> absolute path, also cron.d entries can take arguments. >> >> >> What stupid typo have I made. >> >> P.S> I know this makes me look quite unprofessional, but I'm sure we've >> all hit some kind of stupid brick wall. "Can't see for looking", as the >> saying goes here in Scotland. > > Do you actually have 'find' where you say it is? (/usr/bin/find) I'm sure I checked that. Back on site tonight, so will check again. Gavin. > > Dave. > - -- > Dave Ewart > [EMAIL PROTECTED] > Computing Manager, Epidemiology Unit, Oxford > Cancer Research UK > PGP: CC70 1883 BD92 E665 B840 118B 6E94 2CFD 694D E370 > > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.2.4 (GNU/Linux) > > iD8DBQFBmfOwbpQs/WlN43ARArLHAJ0YeVw0iT2IZ/l5MbmMn8IHwcG/UwCgkA++ > 13NEeJ9B/hWE4NPPZ0KiMQ0= > =uRnG > -END PGP SIGNATURE- >
Re: [OT] cron.d entries for Amanda
Stefan G. Weichinger said: > Hi, Gavin, > > on Dienstag, 16. November 2004 at 13:13 you wrote to amanda-users: > > GH> I keep getting e-mails from crond with errors, e.g. > > > GH> /bin/sh: line 1: /usr/bin/find /u01/app/oracle/archdest2/* -mtime +7 > -exec > GH> rm{}\;: > GH> No such file or directory > > GH> AND > > GH> /bin/sh: line 1: /opt/suretec/sbin/amcheck -m learnit-dbserv-db-warm: > No > GH> such file > GH> or directory > > Look for the EOL. Maybe you have a DOS-type file. This has bitten me a > few times already. > > Just a quick guess Will do. Back on site tonight. > > -- > best regards, > Stefan > > Stefan G. Weichinger > mailto:[EMAIL PROTECTED] > > > > >
Re: [OT] cron.d entries for Amanda
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Tuesday, 16.11.2004 at 12:13 +, Gavin Henry wrote: > Dear guys, > > THis simple error is doing my head in, so I'm going to ask and risk > looking like a fool, but anyway... > > We normally install our Amanda crons in /etc/cron.d/suretec on client > servers (we are using amanda and custom scripts to backup > http://www.eems.co.uk - a very high profile 2 x SUSE Ent 8 servers). > > I keep getting e-mails from crond with errors, e.g. > > > /bin/sh: line 1: /usr/bin/find /u01/app/oracle/archdest2/* -mtime +7 -exec > rm{}\;: > No such file or directory > > AND > > /bin/sh: line 1: /opt/suretec/sbin/amcheck -m learnit-dbserv-db-warm: No > such file > or directory > > > My cron.d entries look like: > > 0 3 * * 1-5 amanda /opt/suretec/sbin/amcheck -m blah.blah > > > I'm pretty so amcheck is in her path and anyway, I have defined the > absolute path, also cron.d entries can take arguments. > > > What stupid typo have I made. > > P.S> I know this makes me look quite unprofessional, but I'm sure we've > all hit some kind of stupid brick wall. "Can't see for looking", as the > saying goes here in Scotland. Do you actually have 'find' where you say it is? (/usr/bin/find) Dave. - -- Dave Ewart [EMAIL PROTECTED] Computing Manager, Epidemiology Unit, Oxford Cancer Research UK PGP: CC70 1883 BD92 E665 B840 118B 6E94 2CFD 694D E370 -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFBmfOwbpQs/WlN43ARArLHAJ0YeVw0iT2IZ/l5MbmMn8IHwcG/UwCgkA++ 13NEeJ9B/hWE4NPPZ0KiMQ0= =uRnG -END PGP SIGNATURE-
[OT] cron.d entries for Amanda
Dear guys, THis simple error is doing my head in, so I'm going to ask and risk looking like a fool, but anyway... We normally install our Amanda crons in /etc/cron.d/suretec on client servers (we are using amanda and custom scripts to backup http://www.eems.co.uk - a very high profile 2 x SUSE Ent 8 servers). I keep getting e-mails from crond with errors, e.g. /bin/sh: line 1: /usr/bin/find /u01/app/oracle/archdest2/* -mtime +7 -exec rm{}\;: No such file or directory AND /bin/sh: line 1: /opt/suretec/sbin/amcheck -m learnit-dbserv-db-warm: No such file or directory My cron.d entries look like: 0 3 * * 1-5 amanda /opt/suretec/sbin/amcheck -m blah.blah I'm pretty so amcheck is in her path and anyway, I have defined the absolute path, also cron.d entries can take arguments. What stupid typo have I made. P.S> I know this makes me look quite unprofessional, but I'm sure we've all hit some kind of stupid brick wall. "Can't see for looking", as the saying goes here in Scotland. -- Kind Regards, Gavin Henry. Managing Director. T +44 (0) 1467 624141 M +44 (0) 7930 323266 F +44 (0) 1224 742001 E [EMAIL PROTECTED] Open Source. Open Solutions(tm). http://www.suretecsystems.com/