Skip to content
Snippets Groups Projects
Commit 35a78673 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

Merge branch 'avoid-re-running-backup-gitlab.sh' into 'master'

Avoid running backup-gitlab twice; reuse tarballs

See merge request !451
parents ef3e01ce 5c953c00
No related branches found
No related tags found
1 merge request!451Avoid running backup-gitlab twice; reuse tarballs
Pipeline #9539 passed
[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
......
......@@ -45,7 +45,8 @@ if systemctl is-active mysqld || systemctl is-active mariadb; then
/usr/local/bin/backup-mysql.sh || true
fi
{% if inventory_hostname == "gitlab.archlinux.org" %}
{# When backing up to offsite, reuse the existing tarballs from the previous backup #}
{% if inventory_hostname == "gitlab.archlinux.org" and item['suffix'] != '-offsite' %}
# Create tarball backups of various GitLab directories using the official backup tool
systemctl is-active docker && /usr/local/bin/backup-gitlab.sh
{% endif %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment