Task #2082

provide a way to set per-vm backup time (e.g. only do gerrit during nighttime)

Added by Christian Lohmaier almost 2 years ago. Updated 3 months ago.

Target version:
Team - Pool
Start date:
Due date:
% Done:


Estimated time:
2:00 h


Right now, salt does random minute/hour assignments, but those are suboptimal when it comes to backing up the produciton machines, as it can happen that the backup happens while the machine is already doing much i/o, so rsync scanning everything is a big, unnecessary penalty...

salt should read corresponding pillar data and use that and only use auto-date when there is none.


#1 Updated by Florian Effenberger over 1 year ago

Has there been any progress? IMHO it makes sense to involve Guilhem at this stage, so he gets insight

#2 Updated by Christian Lohmaier over 1 year ago

the salt template tdf/rsnapshot/crontab just contains:

{% for host, hostinfo in salt['mine.get']('*', 'grains.items').items() %}
{% set minute = salt['random.seed'](60, hostinfo['id']) -%}
{% set hour = salt['random.seed'](24, hostinfo['id']) -%}
{{ minute }} {{ hour }}          2-6,8-13,15-20,22-27,29-31 * *          root    /usr/bin/rsnapshot -c/etc/rsnapshot/{{ hostinfo['id'] }}.conf sync; /usr/bin/rsnapshot -c/etc/rsnapshot/{{ hostinfo['id'] }}.conf daily
[similar lines for weekly/monthly]
{% endfor %}

in other words for all hosts it pics a random minute an hour to run the backup. For machines that take a hit when being backed up, it is desireable to have a pillar data used instead. so a pillar value "backup-time: minute hour" should be used if set, and only use tha random minute/hour if the pillar data is not set.

#3 Updated by Florian Effenberger 11 months ago

  • Assignee changed from Christian Lohmaier to Guilhem Moulin

Reassigning to Guilhem, so he can have a look

#4 Updated by Florian Effenberger 3 months ago

This ticket is 1,5 years old - is it relevant anymore at all?

#5 Updated by Guilhem Moulin 3 months ago

Yes, keeping that open as I planing to heavily work on the backup solution in Q2/Q3 (cf. minutes from the Jan 16 infra call).

Also available in: Atom PDF