Implemented a script in bash that backups a postgres db and added in my root user crontab:
$ sudo crontab -e
0 3,14 * * * /usr/local/bin/backup.sh 10 >> /mnt/backups/backup.log
so it would run daily at 3am and 2pm (at 14 hours) and logs to backup.log to keep a track if running as expected and so on.
now my question is that follows the below requirement? I think it does since using the crontab in sudo so it shouldn't be lost in a reboot but not a expert should there be any extra step that should be done (this will be using containers).
In case of a restart or maintenance of a Linux server the process of backup should be able to execute in the time slot for backup without additional intervention.
It will work after a reboot so no problem there.
That script will start if the system is up and running. If it is off it will not.