Skip to content

Instantly share code, notes, and snippets.

@DeepInThought
Last active June 1, 2019 16:55
Show Gist options
  • Save DeepInThought/6177833534d9d6ac5d12184cc934ef1b to your computer and use it in GitHub Desktop.
Save DeepInThought/6177833534d9d6ac5d12184cc934ef1b to your computer and use it in GitHub Desktop.
Restic installer
#!/bin/bash
mkdir -p ${HOME}/.scripts
sudo useradd -m restic
sudo mkdir -p ~restic/bin | ls -lat --color=always ~restic/bin || exit 1
curl -L https://github.com/restic/restic/releases/download/v0.9.3/restic_0.9.3_linux_amd64.bz2 | bunzip2 > ~restic/bin/restic
sudo chown root:restic ~restic/bin/restic
sudo chmod 750 ~restic/bin/restic
setcap cap_dac_read_search=+ep ~restic/bin/restic
#sudo -u restic /home/restic/bin/restic --exclude={/dev,/media,/mnt,/proc,/run,/sys,/tmp,/var/tmp} -r /tmp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment