Commit 0aa8212a authored by Nigel Kukard's avatar Nigel Kukard

Merge branch 'multivolume' into 'master'

Various fixups

See merge request !16
parents d6b397ab 50d677fd
Pipeline #894 passed with stages
in 2 minutes and 9 seconds
#!/bin/bash
# backstep-traceback-auto - Automatic backup script using backstep-traceback
# Copyright (c) 2010-2017, AllWorldIT
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#set -e -x
......@@ -27,54 +42,6 @@ case ${0##*/} in
echo "ERROR: You need to specify - $0 <period> --verbose."
exit 1
;;
install)
if [ -e /root/bin/backstep-traceback.pl ]
then
mv --verbose /root/bin/backstep-traceback.pl /usr/local/sbin/backstep-traceback
elif [ ! -e /usr/local/sbin/backstep-traceback ]
then
cd /usr/local/sbin/
wget https://gitlab.devlabs.linuxassist.net/awit-backstep-traceback/awit-backstep-traceback/raw/master/backstep-traceback.pl -O backstep-traceback
chmod +x backstep-traceback
fi
if [ ! -e /.backup-filter ]
then
wget https://gitlab.devlabs.linuxassist.net/awit-backstep-traceback/awit-backstep-traceback/raw/master/example/backup-filter.awit -O /.backup-filter
chmod 0600 /.backup-filter
fi
if [ ! -d /etc/backstep-traceback ]
then
mkdir --verbose /etc/backstep-traceback
fi
cd /root/bin/
if [ -f /root/bin/backup-daily ]
then
mv backup-daily daily.conf
echo "Move /root/bin/daily.conf to /etc/backstep-traceback/ after editing out code sections."
fi
if [ ! -h /root/bin/backup-daily ]
then
ln --symbolic backstep-traceback-auto backup-daily
fi
if [ -f /root/bin/backup-weekly ]
then
mv backup-weekly weekly.conf
echo "Move /root/bin/weekly.conf to /etc/backstep-traceback/ after editing out code sections."
fi
if [ ! -h /root/bin/backup-weekly ]
then
ln --symbolic backstep-traceback-auto backup-weekly
fi
exit 0
;;
*)
echo "ERROR: $1 is not a valid option."
exit 1
......@@ -109,7 +76,7 @@ fi
for lv in "${BACKUP_LVS[@]}"
do
# Backup to $PERIOD-$lv ...
/usr/local/sbin/backstep-traceback --backup \
backstep-traceback --backup \
--acl \
--safe \
--deltas \
......@@ -123,7 +90,7 @@ do
done
# Backup host system
/usr/local/sbin/backstep-traceback --backup \
backstep-traceback --backup \
--acl \
--safe \
--deltas \
......
Markdown is supported
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