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

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.
parent 762ecf80
No related branches found
No related tags found
No related merge requests found
Pipeline #24179 passed
......@@ -2,8 +2,8 @@ backup_hosts:
- host: "ssh://u236610.your-storagebox.de:23"
dir: "~/repo"
suffix: ""
borg_cmd: "borg"
borg_cmd: "/usr/bin/borg"
- host: "ssh://zh1905@zh1905.rsync.net:22"
dir: "~/backup/{{ inventory_hostname }}"
suffix: "-offsite"
borg_cmd: "borg --remote-path=borg1"
borg_cmd: "/usr/bin/borg --remote-path=borg1"
#!/bin/bash
BORG_REPO="{{ item['host'] }}/{{ item['dir'] }}" exec /usr/bin/{{ item['borg_cmd'] }} "$@"
BORG_REPO="{{ item['host'] }}/{{ item['dir'] }}" exec {{ item['borg_cmd'] }} "$@"
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