Created
November 19, 2018 07:21
-
-
Save lotherk/71a1f56302fe14c7693a510d350dec2c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
DEST="/path/to/dest" | |
SRCS="/path1 /usr/path2" | |
INCLUDES="" | |
for s in $SRCS; do | |
INCLUDES="${INCLUDES} --include ${s}" | |
done | |
DUPLICITY_ARGS="${DUPLICITY_ARGS} ${INCLUDES} --exclude '**'" | |
DUPLICITY_ARGS="${DUPLICITY_ARGS} --full-if-older-than 7d" | |
duplicity clean --force $DEST | |
duplicity --remove-all-but-n-full 2 --force $DEST | |
duplicity --name $(hostname -f) \ | |
--log-file /var/log/duplicity.log \ | |
$DUPLICITY_ARGS \ | |
$DEST |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment