Use borgs builtin hostname placeholder

dev
hkbakke 2016-12-24 13:40:39 +01:00
parent d8153d4add
commit 7798ccdfc8
1 changed files with 2 additions and 2 deletions

View File

@ -21,7 +21,7 @@ borg_backup () {
$BORG create --info --stats \ $BORG create --info --stats \
--compression lz4 \ --compression lz4 \
--numeric-owner \ --numeric-owner \
"${REPO}"::"$(hostname)-$(date -u +'%Y%m%dT%H%M%SZ')" \ "${REPO}"::"{hostname}-$(date -u +'%Y%m%dT%H%M%SZ')" \
${PATHS[@]} \ ${PATHS[@]} \
${EXCLUDE_CMD[@]} ${EXCLUDE_CMD[@]}
} }
@ -31,7 +31,7 @@ borg_prune () {
# case you for some reason use the same repository for several hosts (not # case you for some reason use the same repository for several hosts (not
# recommended) # recommended)
$BORG prune --info --stats --list \ $BORG prune --info --stats --list \
--prefix "$(hostname)-" \ --prefix "{hostname}-" \
--keep-daily=$KEEP_DAILY \ --keep-daily=$KEEP_DAILY \
--keep-weekly=$KEEP_WEEKLY \ --keep-weekly=$KEEP_WEEKLY \
--keep-monthly=$KEEP_MONTHLY \ --keep-monthly=$KEEP_MONTHLY \