Restic updates

Restic updates

If you are used to the way how easy rclone updates with a one-liner then this may help with restic also. Found it here: https://github.com/restic/restic/issues/1930

“just wanted to share a simple 4-line script to download and install the latest release of restic from Linux shell using cURL to /usr/local/bin:”

RESTIC_TAG_LATEST=$(curl --silent "https://api.github.com/repos/restic/restic/releases/latest" | grep -Po '"tag_name": "v\K.*?(?=")')
echo "Downloading and installing restic v$RESTIC_TAG_LATEST ..."
RESTIC_URL=https://github.com/restic/restic/releases/download/v${RESTIC_TAG_LATEST}/restic_${RESTIC_TAG_LATEST}_linux_amd64.bz2
sudo curl -L --silent ${RESTIC_URL} | bunzip2 > /usr/local/bin/restic

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.