Gentoo Archives: gentoo-server

From: Ben Munat <bent@×××××.com>
To: gentoo-server@l.g.o
Subject: Re: [gentoo-server] cron not doing backup
Date: Sun, 14 Nov 2004 23:35:14
Message-Id: 4197EC71.4080709@munat.com
In Reply to: Re: [gentoo-server] cron not doing backup by Jacob Joseph
1 What's interesting is that cron ran my backup last night successfully...
2 but didn't send the output to the log.
3
4 I have lines like "logger "Server backup: blah blah blah"" in my script
5 and I pipe the rdiff-backup output into logger as well. When I ran the
6 script from the command line, the output showed up just fine in the log.
7 But, when cron runs it, not a peep... and no dead.letter either.
8
9 Oh well, at least my nightly backup is automated now.
10
11 b
12
13
14 Jacob Joseph wrote:
15 > I was watching this conversation to see how others do this sort of thing
16 > and am glad to have learned of dead.letter. Thanks.
17 >
18 > Incidentally, I typically do this sort of debugging by just redirecting
19 > output to a file. That is:
20 >
21 > * * * * * root <script> > /tmp/foo 2>&1
22 >
23 > It always seems like the easiest way to go.
24 >
25 > -Jacob
26 >
27 > Aaron Walker wrote:
28 >
29 >> -----BEGIN PGP SIGNED MESSAGE-----
30 >> Hash: SHA1
31 >>
32 >> Ben Munat wrote:
33 >>
34 >> | PS: or maybe there's somewhere that cron puts the output when it can't
35 >> | mail it?
36 >>
37 >> If you're running the script as root, mail it couldn't deliver would
38 >> be put in
39 >> /root/dead.letter.
40 >>
41 >> |
42 >> | Jonathan Rogers wrote:
43 >> |
44 >> |>
45 >> |> Yes, the programs in /etc/cron.* are running as root, but probably not
46 >> |> with exactly the same environment as when you run them from a login
47 >> |> shell. The cron daemon should mail the output from your script if it
48 >> |> fails. If you can get the error messages, I might be able to help.
49 >> |>
50 >> |> Jonathan Rogers
51 >> |>
52 >>
53 >>
54 >> - --
55 >> Eat drink and be merry, for tomorrow we diet.
56 >>
57 >> Aaron Walker < ka0ttic@g.o > http://dev.gentoo.org/~ka0ttic/
58 >> Gentoo/BSD | cron | shell-tools
59 >> http://butsugenjitemple.org/~ka0ttic/
60 >>
61 >> -----BEGIN PGP SIGNATURE-----
62 >> Version: GnuPG v1.2.6 (GNU/Linux)
63 >> Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
64 >>
65 >> iD8DBQFBlloKC3poscuANHARAja4AJ9qDNISjFWZlpDFd4jIzobQ8uh3rQCguO1t
66 >> y5+lQ06YyqeK58HvD2zRCpY=
67 >> =YsZz
68 >> -----END PGP SIGNATURE-----
69 >
70 >

Replies

Subject Author
Re: [gentoo-server] cron not doing backup stephen white <steve@×××××××××××××××.au>
Re: [gentoo-server] cron not doing backup Richard Yumul <rmy@×××××××××.com>