From 65786716a069dadae0da8e7f613460dbdb97a339 Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Fri, 10 Jun 2022 09:24:44 -0300 Subject: [PATCH] Backup: added ionice and notification --- Backup/.Backup_HD.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Backup/.Backup_HD.sh b/Backup/.Backup_HD.sh index dbcf095..704781f 100755 --- a/Backup/.Backup_HD.sh +++ b/Backup/.Backup_HD.sh @@ -17,7 +17,7 @@ function backup () { # $3 - Files/Folders to backup prepareFolder $1 echo -e "${blue} `date +%r` - Backing up (compressed)...${reset}" - nice -n 19 borg create --compression auto,zstd,9 --exclude-from=./exclude "$1::$2" "$3" + ionice -c 3 nice -n 19 borg create --compression auto,zstd,9 --exclude-from=./exclude "$1::$2" "$3" checkBackup $1 } @@ -27,7 +27,7 @@ function backupNoCompression () { # $3 - Files/Folders to backup prepareFolder $1 echo -e "${blue} `date +%r` - Backing up (uncompressed)...${reset}" - nice -n 19 borg create --compression none --exclude-from=./exclude "$1::$2" "$3" + ionice -c 3 nice -n 19 borg create --compression none --exclude-from=./exclude "$1::$2" "$3" checkBackup $1 } @@ -126,6 +126,7 @@ echo -e "${green}`date +%r` - Backup finished. Please, verify your log files.\e[ echo "$ActiveDisk" > .lastDisk +/usr/bin/curl -d "Backup HD: Completed" ntfy.sh/bft >/dev/null 2>&1 & kdialog --title "Backup Complete" --msgbox "Backup finished successfully" echo echo "Backup on $device is finished. Press any key to close..."