Commit 7ce1f91d authored by Simone Piccardi's avatar Simone Piccardi
Browse files

Correzioni

parent 0701840b
......@@ -220,7 +220,10 @@ if [ ! $DISK ]; then
echo "Deve essere definito il disco/NAS di destinazione"
mail_exit 3
fi
if mount $DISK $BASEDIR >> $TMPLOG 2>&1; then
umount $BASEDIR 2> /dev/null
if mount $DISK $BASEDIR; then
DESTINATION=$BASEDIR/$BACKUP_DIR
# init backup repository if no exists
if [ ! -d $DESTINATION ]; then
......@@ -237,6 +240,7 @@ if mount $DISK $BASEDIR >> $TMPLOG 2>&1; then
fi
# enforce data retention
borg prune --keep-daily $STORICO
umount $BASEDIR
else
echo "Failed to mount backup disk"
mail_exit 4
......
......@@ -14,6 +14,9 @@ STORICO=7
# va specificato nella forma IP:directory
DISK=""
# Base directory for mount
BASEDIR=/mnt
# Backup directory (sul disco montato)
BACKUP_DIR=borgdata
......
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