Download updates after scheduled backup

(Enrique D) #1

Wonderful! job!, :gift_heart:

A question: When in time the updates are checked?

And a request if possible:
Our Internet is slow; so I want to download the updates after work hours (8AM - 6PM), and after a scheduled backup finished successfully, then trigger the “Download updates”.
(*if Backup job succeed => *Download updates);
And I’ll install manually the updates.



Lock to "current release" enabled by default from 7.5
(Michael Träumner) #2

I think you can built a daily cronjob which starts a script. The script should:

start the backup>wait for finishing the backup>start the download of updates

Perhaps @mrmarkuz could help us a little bit how to do this.

(Markus Neuberger) #3

For adding a cronjob you may use this module, so you can setup everything via web UI:

The backup has to be enabled to start it manually, so it’s easier to just make a backup at 6PM and check if it worked later (depends on how long the backup takes).

This line checks if the last backup worked and if yes it starts the update.

cat /var/log/last-backup.log | grep "Errors 0" && yum -y upgrade

I didn’t test, maybe there are better solutions but it should work.

(Enrique D) #4

Thank you @m.traeumner & @mrmarkuz

I’ll install the modules.
How to sent an email when cron-job ends?

(Michael Träumner) #5

cat /path/to/file | mail -s “your subject”

Here is the solution from:

I think you have to add it to your script like this:

cat /var/log/last-backup.log | grep “Errors 0” && yum -y upgrade && cat /path/to/file | mail -s “your subject”