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

borg_client: run compact after pruning on borg 1.2

Only doing this on the Hetzner storage box for now; waiting for
rsync.net to upgrade to borg 1.2 so we can enable it there too.
parent f6e66116
No related branches found
No related tags found
1 merge request!577borg_client: run compact after pruning on borg 1.2
Pipeline #18914 passed
......@@ -4,7 +4,9 @@ backup_hosts:
dir: "~/repo"
suffix: ""
borg_cmd: "borg"
compact_after_prune: true
- host: "ssh://zh1905@zh1905.rsync.net:22"
dir: "~/backup/{{ inventory_hostname }}"
suffix: "-offsite"
borg_cmd: "borg --remote-path=borg1"
compact_after_prune: false # not upgraded to borg 1.2 yet
......@@ -88,4 +88,9 @@ fi
-e "$backup_mountdir/var/lib/archbuilddest" \
-e "$backup_mountdir/var/lib/docker" \
{{ item['host'] }}/{{ item['dir'] }}::$(date "+%Y%m%d-%H%M%S") "$backup_mountdir"
{{ item['borg_cmd'] }} prune -v {{ item['host'] }}/{{ item['dir'] }} --keep-daily=7 --keep-weekly=4 --keep-monthly=6
{% if item['compact_after_prune'] %}
{{ item['borg_cmd'] }} compact -v {{ item['host'] }}/{{ item['dir'] }}
{% 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