Skip to content

How to distribute backup load by some time range? #427

Closed Answered by Kenya-West
Kenya-West asked this question in Q&A
Discussion options

You must be logged in to vote

Solution:

sudo crontab -e

then 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.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kenya-West
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant