From: Peter Palfrader Date: Thu, 8 Oct 2015 12:05:29 +0000 (+0200) Subject: encode backuphost in label for basebackups X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=521f2b44087bbe30746020a2aba93f317995791a;p=mirror%2Fdsa-puppet.git encode backuphost in label for basebackups --- diff --git a/modules/postgres/files/backup_server/postgres-make-base-backups b/modules/postgres/files/backup_server/postgres-make-base-backups index 91b5e2c9a..691b13ab8 100755 --- a/modules/postgres/files/backup_server/postgres-make-base-backups +++ b/modules/postgres/files/backup_server/postgres-make-base-backups @@ -63,6 +63,7 @@ export PGSSLMODE=verify-full export PGSSLROOTCERT=/etc/ssl/debian/certs/ca.crt date=$(date "+%Y%m%d-%H%M%S") +thishost=$(hostname -f) while read host port username cluster version; do [ "${host#\#}" = "$host" ] || continue @@ -72,7 +73,7 @@ while read host port username cluster version; do continue fi - label="$date-$host-$cluster-$version-backup" + label="$thishost-$date-$host-$cluster-$version-backup" [ "$verbose" -gt 0 ] && echo "Doing $host:$port $version/$cluster: $label" target="$cluster.BASE.$label.tar.gz"