Switched Restic installation to use precompiled binary for reduced memory usage
parent
df8ab1cce8
commit
4fb8eef23b
38
manifest.jps
38
manifest.jps
|
@ -276,23 +276,27 @@ actions:
|
||||||
|
|
||||||
installRestic:
|
installRestic:
|
||||||
cmd [cp]: |-
|
cmd [cp]: |-
|
||||||
if which dnf >/dev/null 2>&1; then
|
# Download the latest Restic release
|
||||||
dnf install -y epel-release
|
curl -L https://github.com/restic/restic/releases/download/v0.15.2/restic_0.15.2_linux_amd64.bz2 -o restic.bz2
|
||||||
dnf install -y restic
|
|
||||||
else
|
# Decompress the downloaded file
|
||||||
yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/copart/restic/repo/epel-7/copart-restic-epel-7.repo
|
bzip2 -d restic.bz2
|
||||||
yum-config-manager --enable copr:copr.fedorainfracloud.org:copart:restic
|
|
||||||
yum -y install restic
|
# Make the binary executable
|
||||||
yum-config-manager --disable copr:copr.fedorainfracloud.org:copart:restic
|
chmod +x restic
|
||||||
echo "/var/log/backup_addon.log {
|
|
||||||
weekly
|
# Move it to a directory in your PATH
|
||||||
rotate 52
|
sudo mv restic /usr/local/bin/
|
||||||
missingok
|
|
||||||
notifempty
|
# Set up log rotation for backup logs
|
||||||
compress
|
echo "/var/log/backup_addon.log {
|
||||||
copytruncate
|
weekly
|
||||||
}" > /etc/logrotate.d/backup-addon
|
rotate 52
|
||||||
fi
|
missingok
|
||||||
|
notifempty
|
||||||
|
compress
|
||||||
|
copytruncate
|
||||||
|
}" > /etc/logrotate.d/backup-addon
|
||||||
user: root
|
user: root
|
||||||
|
|
||||||
importScripts:
|
importScripts:
|
||||||
|
|
Loading…
Reference in New Issue