From 4fb8eef23b2518119b280c15540e5ce295969435 Mon Sep 17 00:00:00 2001 From: Anthony Date: Sat, 4 Jan 2025 00:48:58 +0800 Subject: [PATCH] Switched Restic installation to use precompiled binary for reduced memory usage --- manifest.jps | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/manifest.jps b/manifest.jps index d89eca1..859da64 100644 --- a/manifest.jps +++ b/manifest.jps @@ -276,23 +276,27 @@ actions: installRestic: cmd [cp]: |- - if which dnf >/dev/null 2>&1; then - dnf install -y epel-release - dnf install -y restic - else - yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/copart/restic/repo/epel-7/copart-restic-epel-7.repo - yum-config-manager --enable copr:copr.fedorainfracloud.org:copart:restic - yum -y install restic - yum-config-manager --disable copr:copr.fedorainfracloud.org:copart:restic - echo "/var/log/backup_addon.log { - weekly - rotate 52 - missingok - notifempty - compress - copytruncate - }" > /etc/logrotate.d/backup-addon - fi + # Download the latest Restic release + curl -L https://github.com/restic/restic/releases/download/v0.15.2/restic_0.15.2_linux_amd64.bz2 -o restic.bz2 + + # Decompress the downloaded file + bzip2 -d restic.bz2 + + # Make the binary executable + chmod +x restic + + # Move it to a directory in your PATH + sudo mv restic /usr/local/bin/ + + # Set up log rotation for backup logs + echo "/var/log/backup_addon.log { + weekly + rotate 52 + missingok + notifempty + compress + copytruncate + }" > /etc/logrotate.d/backup-addon user: root importScripts: