Commit fcf28281 authored by Steve Kemp's avatar Steve Kemp
Browse files

Preserve source list on upgrade.

parent e4765ab9
symbiosis-backup (2010:0803) stable; urgency=low
* Updated to preserve any custome source list upon upgrade.
-- Steve Kemp <steve@bytemark.co.uk> Tue, 03 Aug 2010 09:33:09 +0100
symbiosis-backup (2010:0706) stable; urgency=low
[ Steve Kemp ]
......
......@@ -24,6 +24,11 @@ fi
##
conf=/etc/backup2l.conf
#
# The default directories to backup
#
SRCLIST=(/etc /root /srv /home /var/mail /var/lib /usr/local /var/backups/mysql)
##
## If we're migrated then we'll have the file /etc/backup2l.conf
## be a symlink to the generated file.
......@@ -38,9 +43,19 @@ if ( ! test -e $conf -a -h $conf ) ; then
#
mv $conf $conf.old >/dev/null 2>/dev/null || true
#
# Source the file to find the backup directories.
#
. $conf.old
fi
#
# Ensure our list of directories is setup
#
perl -pi -e "s!#SRCLIST#!${SRCLIST[*]}!g" /etc/symbiosis/backup.d/conf.d/10-directories.conf
##
## Finally, regardless of whether we're upgrading or not, we
## trigger a rebuild
......
......@@ -5,7 +5,7 @@
#
# List of directories to make backups of.
#
SRCLIST=(/etc /root /srv /home /var/mail /var/lib /usr/local /var/backups/mysql)
SRCLIST=(#SRCLIST#)
# The following expression specifies the files not to be archived.
#
......
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