mirror of
https://gitlab.archlinux.org/archlinux/infrastructure.git
synced 2024-05-27 01:56:10 +02:00
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.
This commit is contained in:
parent
ef3e01ce61
commit
5c953c00fc
|
@ -1,5 +1,10 @@
|
|||
[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 %}
|
||||
|
|
Loading…
Reference in New Issue