Only remove backup if a new update is triggered

to avoid mixed up old files
This commit is contained in:
Daniel Hansson 2016-09-29 21:02:19 +02:00 committed by GitHub
parent 5d583b3882
commit ed2cf1086c

View File

@ -39,10 +39,11 @@ read NCVERSION
echo "Upgrading to $NCVERSION in 15 seconds... Press CTRL+C to abort."
echo "Disclamer: Tech and Me or Nextcloud is not responsible for any dataloss"
echo "Config files are backed up and Data isn't removed, but things could go wrong."
echo "Config files are backed up and $NCDATA isn't removed, but things could go wrong."
sleep 15
# Backup data
rm -R $BACKUP
mkdir -p $BACKUP
echo "Backing up data..."
rsync -Aax $NCPATH/config $BACKUP