[opensuse] Cron Job Problem
I want to run nightly backups, using rdiff-backup. I want the backups to go to one disk drive, Backup1, Monday thru Saturday and a different disk drive, Backup2, on Sunday. I used Kcron to enter the crontab data running as root. Here's what crontab looks like if I run crontab -l after logging in as su -: Earth-svr:~ # crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/root/.kde4/tmp-Earth-svr/kcronh31359.tmp installed on Sun Dec 16 16:12:33 2007) # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $) # This file was written by KCron. Copyright (c) 1999, Gary Meyer # Although KCron supports most crontab formats, use care when editing. # Note: Lines beginning with "#\" indicates a disabled task. # 5 0 * * 1,2,3,4,5,6 rdiff-backup --exclude-filelist /home/dhenson/exclude-list-Earth-svr / /media/Backup1 # 5 0 * * 7 rdiff-backup --exclude-filelist /home/dhenson/exclude-list-Earth-svr / /media/Backup2 Earth-svr:~ # I'm no expert on cron but the crontab looks okay to me. Does anyone see anything wrong with crontab? Do you see anything that might cause the scheduled cron jobs not to run? Any assistance appreciated. Don Henson -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2007-12-21 at 09:52 -0700, Donald D Henson wrote:
I want to run nightly backups, using rdiff-backup.
I think this is the second time you've posted this query. The first time it was suggested to use the full path for rdiff-backup, which is a good suggestion. But you haven't done that and you haven't explained why not, which might be helpful to anybody trying to help you. Another suggestion. Start YaST. Go to system, sysconfig editor, system, cron and set SEND_MAIL_ON_NO_ERROR to yes. Report back what gets output when the script runs. Cheers, Dave -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Dave Howorth wrote:
On Fri, 2007-12-21 at 09:52 -0700, Donald D Henson wrote:
I want to run nightly backups, using rdiff-backup.
I think this is the second time you've posted this query. The first time it was suggested to use the full path for rdiff-backup, which is a good suggestion. But you haven't done that and you haven't explained why not, which might be helpful to anybody trying to help you.
Another suggestion. Start YaST. Go to system, sysconfig editor, system, cron and set SEND_MAIL_ON_NO_ERROR to yes. Report back what gets output when the script runs.
Cheers, Dave
My apologies for posting the same problem twice. Even after being reminded, I don't remember posting it before. In any case, I'll try using FPN after I try your second suggestion. Don't want to change too many variables at once. The script should run tonight. I'll post what happens. Don Henson -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
* Donald D Henson
Dave Howorth wrote:
Another suggestion. Start YaST. Go to system, sysconfig editor, system, cron and set SEND_MAIL_ON_NO_ERROR to yes. Report back what gets output when the script runs.
My apologies for posting the same problem twice. Even after being reminded, I don't remember posting it before. In any case, I'll try using FPN after I try your second suggestion. Don't want to change too many variables at once. The script should run tonight. I'll post what happens.
they do not affect each other. The variable only tells cron to report the status of your entry, the other explains to cron where to find the application. Changing both at the same time does not have the effect you allude. You *should* change both. - -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFHbGJVClSjbQz1U5oRAmRKAJ0YxGQcvMW6K4kQG+BiwI8npLbJNACeOfFq UoGSGRZBSHvIRnqxdZdNHwI= =Q6My -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Patrick Shanahan wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
* Donald D Henson
[12-21-07 18:22]: Dave Howorth wrote:
Another suggestion. Start YaST. Go to system, sysconfig editor, system, cron and set SEND_MAIL_ON_NO_ERROR to yes. Report back what gets output when the script runs.
My apologies for posting the same problem twice. Even after being reminded, I don't remember posting it before. In any case, I'll try using FPN after I try your second suggestion. Don't want to change too many variables at once. The script should run tonight. I'll post what happens.
they do not affect each other. The variable only tells cron to report the status of your entry, the other explains to cron where to find the application. Changing both at the same time does not have the effect you allude. You *should* change both.
Hmmm. Something magic must have happened. The cron job ran and the backup was updated. The only thing I changed was to set SEND_MAIL_ON_NO_ERROR to Yes. (By the way, where does that mail get sent?)I don't understand *why* it worked but it did work. Do you want to leave it as is or would you like to see if we can figure out what happened? Don Henson -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2007-12-22 at 02:34 -0700, Donald D Henson wrote:
Hmmm. Something magic must have happened. The cron job ran and the backup was updated. The only thing I changed was to set SEND_MAIL_ON_NO_ERROR to Yes. (By the way, where does that mail get sent?)
It was sent to you, unless you modify it. Check the mail log.
I don't understand *why* it worked but it did work. Do you want to leave it as is or would you like to see if we can figure out what happened?
If you want to learn for the next time... >:-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHbQnitTMYHG2NR9URAvdFAJ9LwaIuQWi18WLYQaeHfxn1GVn2MgCgj5jS 7TXYB6xISD2ENdyCZ8IaMFc= =8pq7 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
* Donald D Henson
Hmmm. Something magic must have happened. The cron job ran and the backup was updated. The only thing I changed was to set SEND_MAIL_ON_NO_ERROR to Yes. (By the way, where does that mail get sent?)I don't understand *why* it worked but it did work.
SEND_MAIL_ON_NO_ERROR merely sets cron to report "successful" activity to root. It did nothing to your cron job.
Do you want to leave it as is or would you like to see if we can figure out what happened?
You didn't change anything wrt your cron job. BUT, if you don't change it, SEND_MAIL...., root will receive mail notification each time a cron job is successful. You *will* change it when you become annoyed with the notification or when /var runs out of space due to the size of root's mailbox. - -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQFHbSJmClSjbQz1U5oRAjlqAJ42vk6QxF88FqDcOjaAfpvHDOURHgCfVdqv OIRkK7aYgfz5swoMRgn5fLU= =lpr5 -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Saturday 2007-12-22 at 09:42 -0500, Patrick Shanahan wrote:
SEND_MAIL_ON_NO_ERROR merely sets cron to report "successful" activity to root. It did nothing to your cron job. ...
time a cron job is successful. You *will* change it when you become annoyed with the notification or when /var runs out of space due to the size of root's mailbox.
Simply precede the now qorking entry with "-" and it will not report. Mmm... doubt... I don't remember if it supressed the log entry or mail or both. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.4-svn0 (GNU/Linux) iD8DBQFHbUIYtTMYHG2NR9URAnGyAJ9bpDif/DSW1KrRVAwQifZq74w4LACeN1i+ 3X3HSf9AkT8AyFA7qXaISm0= =5SSr -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Saturday 22 December 2007 15:42:47 Patrick Shanahan wrote:
* Donald D Henson
[12-22-07 04:40]: Hmmm. Something magic must have happened. The cron job ran and the backup was updated. The only thing I changed was to set SEND_MAIL_ON_NO_ERROR to Yes. (By the way, where does that mail get sent?)I don't understand *why* it worked but it did work.
SEND_MAIL_ON_NO_ERROR merely sets cron to report "successful" activity to root. It did nothing to your cron job.
It does nothing whatsoever for regular cronjobs. It is a variable read by run-crons, and only sends email for cron jobs in /etc/cron.hourly, cron.daily or cron.weekly Anders -- Madness takes its toll -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Anders Johansson wrote:
On Saturday 22 December 2007 15:42:47 Patrick Shanahan wrote:
* Donald D Henson
[12-22-07 04:40]: Hmmm. Something magic must have happened. The cron job ran and the backup was updated. The only thing I changed was to set SEND_MAIL_ON_NO_ERROR to Yes. (By the way, where does that mail get sent?)I don't understand *why* it worked but it did work. SEND_MAIL_ON_NO_ERROR merely sets cron to report "successful" activity to root. It did nothing to your cron job.
It does nothing whatsoever for regular cronjobs. It is a variable read by run-crons, and only sends email for cron jobs in /etc/cron.hourly, cron.daily or cron.weekly
Anders
Thanks, everyone. My backup is working so I'd like to leave it as is for now. Don Henson -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Donald D Henson wrote:
I want to run nightly backups, using rdiff-backup. I want the backups to go to one disk drive, Backup1, Monday thru Saturday and a different disk drive, Backup2, on Sunday. I used Kcron to enter the crontab data running as root. Here's what crontab looks like if I run crontab -l after logging in as su -:
Earth-svr:~ # crontab -l # DO NOT EDIT THIS FILE - edit the master and reinstall. # (/root/.kde4/tmp-Earth-svr/kcronh31359.tmp installed on Sun Dec 16 16:12:33 2007) # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $) # This file was written by KCron. Copyright (c) 1999, Gary Meyer # Although KCron supports most crontab formats, use care when editing. # Note: Lines beginning with "#\" indicates a disabled task.
# 5 0 * * 1,2,3,4,5,6 rdiff-backup --exclude-filelist /home/dhenson/exclude-list-Earth-svr / /media/Backup1 # 5 0 * * 7 rdiff-backup --exclude-filelist /home/dhenson/exclude-list-Earth-svr / /media/Backup2 Earth-svr:~ #
I'm no expert on cron but the crontab looks okay to me. Does anyone see anything wrong with crontab? Do you see anything that might cause the scheduled cron jobs not to run? Any assistance appreciated.
rdiff-backup probably isn't in cron's path. Try giving a full pathname for rdiff-backup. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (6)
-
Aaron Kulkis
-
Anders Johansson
-
Carlos E. R.
-
Dave Howorth
-
Donald D Henson
-
Patrick Shanahan