[Unit]
Description=Borg backup

{% if inventory_hostname == "gitlab.archlinux.org" %}
# The ordering relation defined below is important for the GitLab backups
# because the offsite backup reuses the tarballs from this service's run.
{% endif %}
Wants=borg-backup-offsite.service
Before=borg-backup-offsite.service

[Service]
Type=oneshot
Restart=on-failure
RestartSec=5m
{% include 'borg-backup-cpu-quota.j2' %}
ExecStart=/usr/local/bin/borg-backup.sh
