Project

General

Profile

Task #2082

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

Added by Christian Lohmaier about 1 year ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Category:
Backups
Target version:
Team - Pool
Start date:
Due date:
% Done:

0%

Estimated time:
2:00 h
Tags:
Salt
URL:

Description

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.

History

#1 Updated by Florian Effenberger about 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 about 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 5 months ago

  • Assignee changed from Christian Lohmaier to Guilhem Moulin

Reassigning to Guilhem, so he can have a look

Also available in: Atom PDF