How to distribute backup load by some time range? #427
|
I have 15 hosts happily backuping to two home laptops exposed to Internet by proxy. The problem is all hosts start backup by cron timers both defined in I do not want all hosts to backup at one time. And I do not want to manually tweak theirs configs. One solution is to implement random seed when starting backup process in config level or Any ideas? |
Replies: 1 comment
|
Solution: sudo crontab -ethen write something like this: #Ansible: Autorestic backup
*/30 * * * * /bin/bash -c 'sleep $((RANDOM\%300))' && /home/kenyawest/backup-restic-node/autorestic/scripts/update-cron.sh- in each host. This job delays script execution in range of 5 minutes. I do this through Ansible, so it manages cron jobs instead of me. |
Solution:
then write something like this:
- in each host. This job delays script execution in range of 5 minutes.
I do this through Ansible, so it manages cron jobs instead of me.