Commit 9e9721c0 authored by Patrick J Cherry's avatar Patrick J Cherry
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
parents 3d8c3dfe d3180ec7
......@@ -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
......
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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment