From 5e2f1e79105729c548317ca3914fa64108986f07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Pi=C3=A9dallu?= Date: Sat, 4 May 2024 17:26:27 +0200 Subject: [PATCH] Fix backup_method: global borg executable is now in venv --- conf/backup_method | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/conf/backup_method b/conf/backup_method index e99dcfc..de6cb58 100644 --- a/conf/backup_method +++ b/conf/backup_method @@ -1,6 +1,8 @@ #!/bin/bash set -eo pipefail +source __INSTALL_DIR__/venv/bin/activate + app="${0#"./05-"}" app="${app%"_app"}" @@ -22,7 +24,7 @@ log_with_timestamp() { } do_backup() { - + export BORG_PASSPHRASE export BORG_RSH export BORG_RELOCATED_REPO_ACCESS_IS_OK=yes @@ -50,13 +52,13 @@ This is an automated message from your beloved YunoHost server." | /usr/bin/mail borg create "$repo::_${name}-${current_date}" ./ 2>&1 >/dev/null | log_with_timestamp popd - # About thi _20 it's a crazy fix to avoid pruning wordpress__2 + # About thi _20 it's a crazy fix to avoid pruning wordpress__2 # if you prune wordpress borg prune "$repo" -P "_${name}-" --keep-hourly 2 --keep-daily=7 --keep-weekly=8 --keep-monthly=12 2>&1 >/dev/null | log_with_timestamp - + # Prune legacy archive name without error on wordpress/wordpress__2 borg prune "$repo" -P "${name}_" --keep-within 2m --keep-monthly=12 2>&1 >/dev/null | log_with_timestamp - + # We prune potential manual backup older than 1 year borg prune "$repo" --keep-within 1y 2>&1 >/dev/null | log_with_timestamp }