1
1
mirror of https://gitlab.archlinux.org/archlinux/infrastructure.git synced 2025-01-18 08:06:16 +01:00
infrastructure/roles/borg_client/templates/borg.j2
Evangelos Foutras 8a9cd33504
borg_client: use absolute path to borg in borg_cmd
Using plain "borg" resolves to /usr/local/bin/borg which is the wrapper
for our main backup host. This causes the offsite backup to be executed
with BORG_REPO set to the main backup destination.

While the above doesn't cause any issues with the backup script/service,
because borg invocations specify the backup destination as an argument,
it's not ideal and/or correct. Adjust borg_cmd to include the full path
of /usr/bin/borg, thus removing any ambiguity.
2022-08-08 08:31:43 +03:00

4 lines
95 B
Django/Jinja

#!/bin/bash
BORG_REPO="{{ item['host'] }}/{{ item['dir'] }}" exec {{ item['borg_cmd'] }} "$@"