0

I am using CentOS and trying to perform a backup of my /home directory using crontab.

When I run my dump command in the terminal it works fine but when I try to run it using crontab it does not run.

This is my command: (runs once a week, Friday at 8pm)

0 20 * * 5 dump -0f /Mt/home.bck /home

Why doesn't it run?

When I look at the log file of cron it says:

(root) CMD (dump -0f /Mt/home.bck /home)

This message is printed every time the crotab is supposed to run.

4

2 回答 2

1

Most likely because dump can't be found in the environment in which cron is running,

于 2013-10-25T23:16:35.540 回答
0

You should always start by looking at the logs. In CentOS, cron stores logs to /var/log/cron. Try less +F /var/log/cron to see where the actual error is, then report back here what the real error was!

于 2013-10-25T23:16:59.553 回答