From ed3aa290e98bafa0918911bfce16fa7a0757261e Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Fri, 24 Nov 2023 19:33:02 +0100 Subject: [PATCH] updated borg state --- states/borg/defaults.yaml | 1 - states/borg/templates/borg_job.sh.j2 | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/states/borg/defaults.yaml b/states/borg/defaults.yaml index 0072e8e..69b2cd1 100644 --- a/states/borg/defaults.yaml +++ b/states/borg/defaults.yaml @@ -5,7 +5,6 @@ borg: working_dir: /opt/borg log_dir: /var/log/borg default_dirs: - - logs - scripts pip_pkgs: - borgbackup diff --git a/states/borg/templates/borg_job.sh.j2 b/states/borg/templates/borg_job.sh.j2 index 56c8e07..c762daa 100644 --- a/states/borg/templates/borg_job.sh.j2 +++ b/states/borg/templates/borg_job.sh.j2 @@ -22,6 +22,12 @@ repo_path={{ job.sshrepo|default('localhost::tmp') }} export BORG_REPO=$repo_path/${backup_name} export BORG_PASSPHRASE='{{ job.password }}' +if [[ $1 == "list" ]] +then + borg list + exit +fi + info "Starting backup" info "Init repository backup"