Riaan's SysAdmin Blog

My tips, howtos, gotchas, snippets and stuff. Use at your own risk!

restic

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

admin

Bio Info for Riaan