From b63be476a1a3fa6bc565b81a21a8689976152aa2 Mon Sep 17 00:00:00 2001 From: akanealw Date: Tue, 10 Oct 2023 14:12:26 -0500 Subject: [PATCH] added lines to download backup script --- debian/debian-download-configure-wrestic.sh | 3 +++ restic/wrestic-backup-to-truenas.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/debian/debian-download-configure-wrestic.sh b/debian/debian-download-configure-wrestic.sh index bce55a7..511e42d 100644 --- a/debian/debian-download-configure-wrestic.sh +++ b/debian/debian-download-configure-wrestic.sh @@ -13,6 +13,7 @@ mkdir -pv /home/akanealw/restic/restore mkdir -pv /root/restic/restore wget -O /usr/local/bin/wrestic http://192.168.1.50/files/wrestic/wrestic wget -O /home/akanealw/.config/wrestic/wrestic.toml http://192.168.1.50/files/wrestic/wrestic.toml +wget -O /home/akanealw/scripts/wrestic-backup-to-truenas.sh http://192.168.1.50/scripts/restic/wrestic-backup-to-truenas.sh sed -i "s/changemepls/$HOSTNAME/g" /home/akanealw/.config/wrestic/wrestic.toml sed -r 's/(resticbackups)(.*)/\1\L\2\E/g' /home/akanealw/.config/wrestic/wrestic.toml > /home/akanealw/.config/wrestic/wrestic2.toml mv /home/akanealw/.config/wrestic/wrestic.toml /home/akanealw/.config/wrestic/wresticbackup.toml @@ -20,4 +21,6 @@ mv /home/akanealw/.config/wrestic/wrestic2.toml /home/akanealw/.config/wrestic/w rm .config/wrestic/wresticbackup.toml chown -R akanealw:akanealw /home/akanealw/.config chown -R akanealw:akanealw /home/akanealw/restic +chown -R akanealw:akanealw /home/akanealw/scripts +chmod +x /home/akanealw/scripts/wrestic-backup-to-truenas.sh chmod +x /usr/local/bin/wrestic diff --git a/restic/wrestic-backup-to-truenas.sh b/restic/wrestic-backup-to-truenas.sh index 83c7294..270375e 100644 --- a/restic/wrestic-backup-to-truenas.sh +++ b/restic/wrestic-backup-to-truenas.sh @@ -1,3 +1,3 @@ #!/bin/bash -wrestic backup +sudo wrestic backup