From 5ceb427bf41eede2c09c02f5d17e6e4e676291ce Mon Sep 17 00:00:00 2001 From: akanealw Date: Thu, 30 Nov 2023 19:32:47 -0600 Subject: [PATCH] updated wrestic script --- wrestic/wrestic-backup-to-truenas-local.sh | 3 ++- wrestic/wrestic-backup-to-truenas-lxc.sh | 3 ++- wrestic/wrestic-backup-to-truenas-sftp.sh | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/wrestic/wrestic-backup-to-truenas-local.sh b/wrestic/wrestic-backup-to-truenas-local.sh index cba9c42..bf7fe5b 100644 --- a/wrestic/wrestic-backup-to-truenas-local.sh +++ b/wrestic/wrestic-backup-to-truenas-local.sh @@ -2,9 +2,10 @@ if ping -c 1 192.168.1.41 > /dev/null 2>&1 then - if [[ -d /mnt/truenas-backups/archivebackups ]] + if [[ -d /mnt/truenas-backups/resticbackups ]] then sudo wrestic backup + sudo restic cache --cleanup else echo "TrueNAS is offline" fi diff --git a/wrestic/wrestic-backup-to-truenas-lxc.sh b/wrestic/wrestic-backup-to-truenas-lxc.sh index 308c0fb..93ba5c3 100644 --- a/wrestic/wrestic-backup-to-truenas-lxc.sh +++ b/wrestic/wrestic-backup-to-truenas-lxc.sh @@ -2,9 +2,10 @@ if ping -c 1 192.168.1.41 > /dev/null 2>&1 then - if [[ -f /mnt/resticbackups/config ]] + if [[ -f /mnt/resticbackups/etc/config ]] then sudo wrestic backup + sudo restic cache --cleanup else echo "TrueNAS is offline" fi diff --git a/wrestic/wrestic-backup-to-truenas-sftp.sh b/wrestic/wrestic-backup-to-truenas-sftp.sh index fda6b49..cd34134 100644 --- a/wrestic/wrestic-backup-to-truenas-sftp.sh +++ b/wrestic/wrestic-backup-to-truenas-sftp.sh @@ -3,6 +3,7 @@ if ping -c 1 192.168.1.41 > /dev/null 2>&1 then sudo wrestic backup + sudo restic cache --cleanup else echo "TrueNAS is offline" fi