Skip to content
Snippets Groups Projects
Verified Commit 5c953c00 authored by Evangelos Foutras's avatar Evangelos Foutras :smiley_cat:
Browse files

Avoid running backup-gitlab twice; reuse tarballs

The official backup tool for GitLab takes many hours to run because it
puts everything inside tarballs and then gzips each one. It seems safe
and much more efficient to skip this step for the offsite backup while
reusing the tarballs generated by the first backup to the Storage Box.

Should save ~5 hours from the borg-backup-offsite.service execution.
parent ef3e01ce
No related branches found
No related tags found
1 merge request!451Avoid running backup-gitlab twice; reuse tarballs
Pipeline #9538 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