cron backup job fails to run
hey LQ!
long time no hear! :) I'm having a small issue where the backup jobs that I set to run in the crontab of the backup user do not appear to be running. Here's how I set it up (with crontab -e as the backup user): run amanda every night (check at 2:45 and backup at 3) Code:
45 2 * * * /usr/sbin/amcheck 1>> /var/log/amanda/crontab/amcheck.log them in on the command line: Code:
[amandabackup@amanda ~]$ ls -l /usr/sbin/amcheck Code:
[amandabackup@amanda ~]$ ls -l /usr/sbin/amdump Although I'm not sure what the 's' indicates in the permissions of amcheck. And here's a tail of the cron logs Code:
[root@amanda init.d]# tail /var/log/cron Code:
bluethundr@amanda:~/rpm$ sudo ps -ef | grep cron :) |
Some remarks:
Code:
* 3 * * * Code:
[amandabackup@amanda ~]$ ls -l /usr/sbin/amcheck Code:
#!/bin/sh |
Some more considerations:
Your command... [root@amanda init.d]# tail /var/log/cron ...doesn't show us the relevant time from the cron log file. In other words, your tail starts with the time 07:01:01 A.M., but the time we need to see is around 2:45 - 4am. If that time frame isn't in the current cron log file, it might have been rotated out. Look for files like cron.1, cron.2 and look (more, less, cat, etc.) through those files. Second, did the cron job create a /var/log/amanda/crontab/amcheck.log or /var/log/amanda/crontab/amdump.log file? What's in them? Hoping that helps... |
Just a couple of comments.
Presuming you work in the daytime, there is not much point in running amcheck at 2:45am and then running amdump at 3:00am (assuming you meant to do "0 3 * * *"), since there is no one around to respond to the amcheck. Typically, you would run amcheck around 15:00 in the afternoon so that you can do something about any issues there might be and not have an amdump fail in the middle of the night. Second, is your configuration actually named "1"? amcheck and amdump take at least the name of the configuration as an argument. Typically, that would be something like "daily", and your command would be `amcheck daily`. Third, you are routing the output to /var/log/amanda/crontab/amcheck.log and amdump.log. Is there anything in those files after your run? I'm inclined to think not, because amcheck and amdump, when run from cron, typically spawn off as daemon like processes and send you a report by email. Your email should be in the amanda.conf in the configuration directory. Can you tell us anything about your installation and configuration of Amanda? |
Quote:
|
Quote:
Anyway, that clarifies that the commands are missing the required argument, which is the name of the configuration that they are to run. Since they are designed to run in background from cron and send reports via email, I would just get rid of all the extraneous >> stuff. |
All times are GMT -5. The time now is 12:33 PM. |