Permalink
Browse files

Merge branch 'stretch_prevent-backup2l-lock-sync' into 'stretch'

Prevent backup2l post-backup syncing .lock files

See merge request open-source/symbiosis!106
  • Loading branch information...
Patrick J Cherry
Patrick J Cherry committed Aug 22, 2018
2 parents 3d8c3df + d3180ec commit 9e9721c07e48603d95940f6e2145086ec6dcc59e
@@ -72,7 +72,7 @@ end
#
puts "Sending backups to #{dest}...\n"

puts `rsync --bwlimit=768 --delete-before --delete-excluded --exclude 'localhost/TMP.*' --quiet --archive --recursive --perms --no-owner --no-group --human-readable #{src} #{dest}`
puts `rsync --bwlimit=768 --delete-before --delete-excluded --exclude 'localhost/TMP.*' --exclude 'localhost/*.lock' --quiet --archive --recursive --perms --no-owner --no-group --human-readable #{src} #{dest}`

#
# Exit with the exit status of the rsync command
@@ -1,3 +1,9 @@
symbiosis-backup (2018:0820) stable; urgency=medium

* Prevented *.lock from being synced to backup space.

-- Paul Cammish <paul.cammish@bytemark.co.uk> Mon, 20 Aug 2018 12:08:00 +0100

symbiosis-backup (2018:0730) stable; urgency=medium

* Removed output when not finding deprecated Bytemark backup space.
@@ -24,49 +24,38 @@ APT_LIST=/etc/apt/sources.list.d/symbiosis.list
# upgrade - upgrade to latest from a symbiosis-stretch base
# dist-upgrade - upgrade to latest from symbiosis-jessie

if [ "upgrade" = "$ACTION" ] ; then
do_upgrade() {
echo "I: seed debconf"
debconf-set-selections < "$CONF/debconf-preseed"
debconf-set-selections < "$1/debconf-preseed"

echo "I: Install current symbiosis.bytemark.co.uk release"
echo "deb http://symbiosis.bytemark.co.uk/$DEBIAN_RELEASE/ ./" > $APT_LIST
echo "I: perform update"
apt-get $APT_OPTS update
apt-get $APT_OPTS install $(< $CONF/packages)

echo "I: Re-seed debconf"
debconf-set-selections < "$CONF/debconf-preseed"
echo "I: perform $2"
if [ "$2" = "install" ] ; then
apt-get $APT_OPTS install $(< $1/packages)
else
apt-get $APT_OPTS $2
fi
}

echo "I: Add new version's sources"
cp $CONF/sources.list $APT_LIST
echo "deb http://repo.bytemark.co.uk/open-source/symbiosis/$BRANCH_NAME/latest/ ./" >> $APT_LIST
apt-get $APT_OPTS upgrade
if [ "upgrade" = "$ACTION" ] ; then
echo "I: Install current symbiosis.bytemark.co.uk release"
echo "deb http://symbiosis.bytemark.co.uk/$DEBIAN_RELEASE/ ./" > $APT_LIST

elif [ "dist-upgrade" = "$ACTION" ] ; then
echo "I: seed debconf with $OLD_DEBIAN_RELEASE config"
debconf-set-selections < "$OLD_CONF/debconf-preseed"
do_upgrade $CONF install

elif [ "dist-upgrade" = "$ACTION" ] ; then
echo "I: Install $OLD_DEBIAN_RELEASE version of Symbiosis from symbiosis.bytemark.co.uk"
echo "deb http://symbiosis.bytemark.co.uk/$OLD_DEBIAN_RELEASE/ ./" > $APT_LIST
apt-get $APT_OPTS update
apt-get $APT_OPTS install $(< $OLD_CONF/packages)

echo "I: Re-seed debconf with $DEBIAN_RELEASE config"
debconf-set-selections < "$CONF/debconf-preseed"
do_upgrade $OLD_CONF install

echo "I: Add new version's sources"
cp $CONF/sources.list $APT_LIST
echo "deb http://repo.bytemark.co.uk/open-source/symbiosis/$BRANCH_NAME/latest/ ./" >> $APT_LIST
sed -e "s/$OLD_DEBIAN_RELEASE/$DEBIAN_RELEASE/g" -i /etc/apt/sources.list
cat /etc/apt/sources.list $APT_LIST

echo "I: Perform dist-upgrade"
apt-get $APT_OPTS update
apt-get $APT_OPTS dist-upgrade
else
echo "I: Install latest version of Symbiosis from repo.bytemark.co.uk"
cp $CONF/sources.list $APT_LIST
echo "deb http://repo.bytemark.co.uk/open-source/symbiosis/$BRANCH_NAME/latest/ ./" >> $APT_LIST
apt-get $APT_OPTS update
apt-get $APT_OPTS install $(< $CONF/packages)
fi

echo "I: $ACTION $BRANCH_NAME version of Symbiosis from repo.bytemark.co.uk"
cp $CONF/sources.list $APT_LIST
echo "deb http://repo.bytemark.co.uk/open-source/symbiosis/$BRANCH_NAME/latest/ ./" >> $APT_LIST

do_upgrade $CONF $ACTION

0 comments on commit 9e9721c

Please sign in to comment.