My daily backup crashed, how can I rerun cron daily?
My daily backup crashed because a "bad" file of 30 MB existed which caused me to exceed by 25 MB daily backup limit:
-rw-rw-r-- rick/rick 29018177 2021-08-09 23:07 .config/mserve/ipc.pickle
I've removed the file but how can I call tell cron to run /etc/cron.daily
jobs again?
Solution 1:
This answer is close but you really want to use:
sudo run-parts /etc/cron.daily
The linked answer omits sudo
and my daily backup crashed again. This is because the same .tar
work file (with errant 30 MB file) that was created with sudo
privileges (which cron runs with) still existed.
I had removed the "bad" 30 MB file but the earlier .tar
file created by the original cron
job was still about. My regular user privileges simply were insufficient to recreate a new .tar
file.
If you call run-parts
without sudo
your environment is different. Using sudo
for run-parts
makes it work. In my case at least.