No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

backupx 393B

12345678910111213141516
  1. #!/usr/bin/env sh
  2. #
  3. # pbrisbin 2013 - perform a backup via tarsnap.
  4. #
  5. ###
  6. die() { printf "%s\n" "$*" >&2; exit 1; }
  7. [ $UID -eq 0 ] || die 'You must be root'
  8. which tarsnap >/dev/null || die 'You must install tarsnap'
  9. timestamp="$(date +%Y%m%d.%H:%M:%S)"
  10. tarsnap "$@" \
  11. --keyfile /root/tarsnap.key \
  12. --cachedir /usr/local/tarsnap-cache \
  13. -c -f "backup-$timestamp" /root /home /etc /srv