Skip to content

Instantly share code, notes, and snippets.

@opie4624
Forked from mdigital/tarsnap-install.sh
Last active December 11, 2015 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save opie4624/64b2df5f30d1c52a692c to your computer and use it in GitHub Desktop.
Save opie4624/64b2df5f30d1c52a692c to your computer and use it in GitHub Desktop.
Debian / Ubuntu Tarsnap installation
#!/bin/sh
# Installs tarsnap client on Debian and Ubuntu
#
# You'll need to setup an account at
# http://www.tarsnap.com
# and load it with some funds
#
# Make sure you run this as root
#
# Once installed you can start backing up with something useful like
#
# tarsnap -c -f mybackup /var/www
#
# Usage:
# ./tarsnap-install.sh <email> <server name>
#
# eg
# ./tarsnap-install.sh robin@mdigital.co.nz prod2
apt-get install -y curl libssl-dev zlib1g-dev e2fslibs-dev build-essential
mkdir ~/src
cd ~/src
curl https://www.tarsnap.com/download/tarsnap-autoconf-1.0.36.1.tgz | tar -zxvf -
cd tarsnap-autoconf-1.0.32
./configure
make all install clean
tarsnap-keygen --keyfile /root/tarsnap.key --user $1 --machine $2
mkdir /usr/local/tarsnap-cache
cp /usr/local/etc/tarsnap.conf.sample /usr/local/etc/tarsnap.conf
echo "Don't forget to take a copy of /root/tarsnap.key and store it somewhere really safe!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment