Commit 81fa1f58 authored by Sven-Hendrik Haase's avatar Sven-Hendrik Haase
Browse files

Merge branch 'restart-failed-backups' into 'master'

Restart failed backups (fixes #270)

Closes #270

See merge request !288
parents 79e26ad6 fffc225e
Pipeline #4897 passed with stage
in 40 seconds
[Unit]
Description=Borg backup (offsite)
[Service]
Type=oneshot
Restart=on-failure
RestartSec=5m
ExecStart=/usr/local/bin/borg-backup-offsite.sh
[Unit]
Description=Borg backup
Wants=borg-backup-offsite.service
Before=borg-backup-offsite.service
[Service]
Type=oneshot
Restart=on-failure
RestartSec=5m
ExecStart=/usr/local/bin/borg-backup.sh
......@@ -58,10 +58,11 @@
when: inventory_hostname == "gitlab.archlinux.org"
- name: install systemd timer and service for backup
template: src={{ item }}.j2 dest=/etc/systemd/system/{{ item }} owner=root group=root mode=0644
copy: src={{ item }} dest=/etc/systemd/system/{{ item }} owner=root group=root mode=0644
with_items:
- borg-backup.timer
- borg-backup.service
- borg-backup-offsite.service
- name: activate systemd timers for backup
systemd: name=borg-backup.timer enabled=yes state=started daemon-reload=yes
[Unit]
Description=Borg backup
[Service]
Type=oneshot
{% for backup in backup_hosts %}
ExecStart=/usr/local/bin/borg-backup{{ backup['suffix'] }}.sh
{% endfor %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment