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:
|
||||
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:
|
||||
|
|
Loading…
Reference in New Issue