I originally posted this in April, and the topic closed and never really got resolved.
I have a scheduled cron backup job from my Webmin NAS to my adjacent Synology NAS. The problem is, it’s not running as scheduled. I can run it manually, and the backup will work fine, but we all know it’s far better to have backups running automatically.
I have the cron job scheduled to run daily at midnight, as you can see in the attached screenshot. But it’s not actually running, and I’m not sure what I need to change.
@popmay is right.This will cause the cron to run every minute on every hour. This will cause the backup cron to keep running and maybe even starting a new cron instance even before the last one has finished.
You should only use the All option on days so the cron is run every day etc…
@jimr1 I see what you mean, and you are right that the advanced options below will be ignored.
Just a thought, it may be that in the cron enviroment your path maybe different to what your user at the terminal gets hence it runs in the terminal but not as a cron job. It may be worth using the full path to rsync (you can find that using which rsync in a terminal) or copy your user PATH to a cron enviroment variable
You will really have to ELI5 with me. This is a basic (old) home NAS operated by a single person (me) who is even struggling to make that basic functionality work. I just want it to backup daily at midnight to my other NAS. That simple.
I noticed when I flipped them from All to Selected while maintaining the Simple Schedule, after I save, they flip right back to All.
OK, so I flipped it back to Simple Schedule, Daily (at midnight). I also typed which rsync into a terminal and got /usr/bin/rsync so I updated the cron job accordingly. This is what I have now. Does that look right?
Run the cron job from the gui ‘save and run now’ and see if it works … as we can not see the full command there could be errors there, the email address associated with the cron job should receive an email showing the output from the cron command but using ‘save and run now’ should display what errors are there, unless you have piped the output to null
There are no other crons for me. This is the only one.
This is supposed to be a very simple NAS setup for me just for storing my media (especially my extensive photography), so I’m not doing anything at all exotic.
Just learned that Rocky is a Linux distro. I am on Debian 11.
In step-by-step language, how do I check these cron logs? Which commands?
Still very much a noob here.
The way I checked before was literally looking at my Synology backup server and seeing if the newest file on my Linux server was there too the next day. (It wasn’t backing up when I posted this unless I ran the cron job manually.) I’m sure there is a better way.
Presume NOTHING with me! I fully admit to having no idea what I’m doing when it comes to servers, Linux, etc. But I just checked Bootup and Shutdown and saw this. So, I THINK it’s enabled? If you are looking at a different screen in Webmin, could you please let me know where to find that screen?
Yes research how to use a linux environment and test stuff rigorously before you put it into production maybe run crontab -e from the command line to see what you have actually configured, then work out what’s failing
Do you understand what I’m doing with this box? It’s a basic home NAS in my living room, mostly for my hobby photography. Simple storage and running backups to the other NAS sitting next to it. I’m not running an enterprise or even a small business here. Not even a real homelab. I don’t have a test environment.
Install something like virtualbox and create a test environment then from working out whats wrong and fixing it move that to your (production i.e home) server. But I guess you know best