Commit 14b5b3c6 authored by Simone Piccardi's avatar Simone Piccardi
Browse files

Messaggi più chiari

parent c573dccc
......@@ -227,22 +227,24 @@ DESTINATION=$BASEDIR/$BACKUP_DIR
umount $BASEDIR 2> /dev/null
if mount $DISK $BASEDIR; then
echo "FUSS backup started at $(date +%R)"
# init backup repository if no exists
if [ ! -d $DESTINATION ]; then
borg init --encryption=none $DESTINATION
if [ -f /etc/fuss-backup/fuss-backup.exclude ]; then
echo "E' attivo un file di esclusione"
echo "File di esclusione attivo"
borg create --exclude-from=/etc/fuss-backup/fuss-backup.exclude \
$DESTINATION::{hostname}-{now:%Y-%m-%dT%H:%M:%S} $PATHS
echo "Non e' stato utilizzato il file di esclusione"
echo "File di esclusione non attivo"
borg create \
$DESTINATION::{hostname}-{now:%Y-%m-%dT%H:%M:%S} $PATHS
# enforce data retention
borg prune --keep-daily $RETENTION $DESTINATION
umount $BASEDIR
echo "FUSS backup completed at $(date +%R)"
echo "Failed to mount backup device $DISK"
mail_exit 4
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