Gentoo Archives: gentoo-server

From: Ben Munat <bent@×××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] cron not doing backup
Date: Mon, 15 Nov 2004 16:57:32
Message-Id: 4198E0A3.6040604@munat.com
In Reply to: Re: [gentoo-server] cron not doing backup by Richard Yumul
1 Crap... I'm losing my mind... I guess I misread the "--list-increments"
2 output yesterday. It appears that the backup script actually failed last
3 night *and* the night before. And there's a dead.letter -- though I'd
4 swear it wasn't there yesterday -- that says the script still couldn't
5 find my exclude-list.txt. I changed the script to give it the full path
6 to that file... hopefully that'll fix it.
7
8 Sorry for the wild goose chase...
9
10 b
11
12
13 Richard Yumul wrote:
14 > are you specifying the full path to logger? The environment when a
15 > script is run from cron is not always the same as the root env., so you
16 > typically have to specify the full path to the program...
17 >
18 > HTH,
19 > Rich
20 >
21 >
22 >
23 > Ben Munat wrote:
24 >
25 >> What's interesting is that cron ran my backup last night
26 >> successfully... but didn't send the output to the log.
27 >>
28 >> I have lines like "logger "Server backup: blah blah blah"" in my
29 >> script and I pipe the rdiff-backup output into logger as well. When I
30 >> ran the script from the command line, the output showed up just fine
31 >> in the log. But, when cron runs it, not a peep... and no dead.letter
32 >> either.
33 >>
34 >> Oh well, at least my nightly backup is automated now.
35 >>
36 >> b
37 >>
38 >>
39 >> Jacob Joseph wrote:
40 >>
41 >>> I was watching this conversation to see how others do this sort of
42 >>> thing and am glad to have learned of dead.letter. Thanks.
43 >>>
44 >>> Incidentally, I typically do this sort of debugging by just
45 >>> redirecting output to a file. That is:
46 >>>
47 >>> * * * * * root <script> > /tmp/foo 2>&1
48 >>>
49 >>> It always seems like the easiest way to go.
50 >>>
51 >>> -Jacob
52 >>>
53 >>> Aaron Walker wrote:
54 >>>
55 >>>> -----BEGIN PGP SIGNED MESSAGE-----
56 >>>> Hash: SHA1
57 >>>>
58 >>>> Ben Munat wrote:
59 >>>>
60 >>>> | PS: or maybe there's somewhere that cron puts the output when it
61 >>>> can't
62 >>>> | mail it?
63 >>>>
64 >>>> If you're running the script as root, mail it couldn't deliver would
65 >>>> be put in
66 >>>> /root/dead.letter.
67 >>>>
68 >>>> |
69 >>>> | Jonathan Rogers wrote:
70 >>>> |
71 >>>> |>
72 >>>> |> Yes, the programs in /etc/cron.* are running as root, but
73 >>>> probably not
74 >>>> |> with exactly the same environment as when you run them from a login
75 >>>> |> shell. The cron daemon should mail the output from your script if it
76 >>>> |> fails. If you can get the error messages, I might be able to help.
77 >>>> |>
78 >>>> |> Jonathan Rogers
79 >>>> |>
80 >>>>
81 >>>>
82 >>>> - --
83 >>>> Eat drink and be merry, for tomorrow we diet.
84 >>>>
85 >>>> Aaron Walker < ka0ttic@g.o > http://dev.gentoo.org/~ka0ttic/
86 >>>> Gentoo/BSD | cron | shell-tools
87 >>>> http://butsugenjitemple.org/~ka0ttic/
88 >>>>
89 >>>> -----BEGIN PGP SIGNATURE-----
90 >>>> Version: GnuPG v1.2.6 (GNU/Linux)
91 >>>> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
92 >>>>
93 >>>> iD8DBQFBlloKC3poscuANHARAja4AJ9qDNISjFWZlpDFd4jIzobQ8uh3rQCguO1t
94 >>>> y5+lQ06YyqeK58HvD2zRCpY=
95 >>>> =YsZz
96 >>>> -----END PGP SIGNATURE-----
97 >>>
98 >>>
99 >>>
100 >
101 > --
102 > ------------------------------------------------------------------------
103 > Richard M Yumul
104 > rmy@×××××××××.com <mailto:rmy@×××××××××.com>
105 > SDTechnix
106 > http://www.sdtechnix.com
107 > ------------------------------------------------------------------------