From a707d697a4bf13896a82dbafdfb2f5c6d9ce12bc Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 2 Jul 2023 21:32:58 +0200 Subject: [PATCH] updated borg state --- states/borg/templates/borg_job.sh.j2 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/states/borg/templates/borg_job.sh.j2 b/states/borg/templates/borg_job.sh.j2 index 386f949..9273638 100644 --- a/states/borg/templates/borg_job.sh.j2 +++ b/states/borg/templates/borg_job.sh.j2 @@ -33,16 +33,16 @@ info "Starting before tasks" {%- endfor %} info "Creating new archive" -borg create \ - --verbose \ - --filter AME \ - --list \ - --stats \ - --show-rc \ +borg create \ + --verbose \ + --filter AME \ + --list \ + --stats \ + --show-rc \ --compression {{ job.compression|default('lz4') }} \ {%- if job.excluded_dirs is defined -%} {%- for exclude in job.excluded_dirs %} - --exclude '{{ exclude }}' \ + --exclude '{{ exclude }}' \ {%- endfor %} {%- endif %} --exclude-caches \ @@ -55,13 +55,13 @@ borg create \ backup_exit=$? info "Pruning repository" -borg prune \ - --list \ - --prefix $backup_name'-' \ - --show-rc \ - --keep-daily {{ job.keep_daily|default(7) }} \ - --keep-weekly {{ job.keep_weekly|default(4) }} \ - --keep-monthly {{ job.keep_monthly|default(6) }} \ +borg prune \ + --list \ + -a $backup_name'-' \ + --show-rc \ + --keep-daily {{ job.keep_daily|default(7) }} \ + --keep-weekly {{ job.keep_weekly|default(4) }} \ + --keep-monthly {{ job.keep_monthly|default(6) }} \ info "Cleaning up logs" find {{ log_dir }}/${backup_name}-*.log -mtime +{{ job.keep_logs_days|default(7) }} -delete