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