0

Yesterday I've configured rsnapshot on a debian 9 machine, but the cron's I've set for the backups in /etc/cron.d/rsnapshot are not being executed.

Also, after I save & close the /etc/cron.d/rsnapshot it doesn't say it installed the new crontab.

How can I find out why it's not being executed? I've already done some searching on this website and have found the following things:

  • There are no entries in /var/mail
  • Right permissions + owner for /etc/crontab

Also the cron process is running:

ps aux | grep cron root       364  0.0  0.0  29664  2880 ?        Ss   Oct12   0:05 /usr/sbin/cron -f

The cron is set as following:

0 */4* * *      root    /usr/bin/rsnapshot hourly

Any suggestions on how I can find out why the crons are not being executed? I've already tried executing the command manually (this works) and have also tried nano and vim while editing and closing the rsnapshot cron file.

1

You miss one space in the cron record. I should be like this:

0 */4 * * *      root    /usr/bin/rsnapshot hourly
  • Sorry for that, I've corrected it. However it still doesn't say it saved the new crontab once I close the file. – user2191227 Nov 6 '18 at 8:22
  • @user2191227, you will get this text if you exec crontab -e and not when you use cron.d directory – Romeo Ninov Nov 6 '18 at 8:26
  • Ah alright thanks for clearing that up, I'll wait and see if it worked out – user2191227 Nov 6 '18 at 8:36
  • 1
    The cron is now running, thanks Romeo for your help! – user2191227 Nov 6 '18 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.