From 108e82c07a22f96619cff2c23b1fb5b79aa3e30b Mon Sep 17 00:00:00 2001 From: Bruno Fontes Date: Wed, 28 Jun 2023 11:32:30 -0300 Subject: [PATCH] feat: adding ntfy to backup scripts --- Backup/.Backup_HD.sh | 3 ++- Backup/.lastDisk | 2 +- Services/backup-contabo.sh | 4 ++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Backup/.Backup_HD.sh b/Backup/.Backup_HD.sh index 3fa55e1..07f24a6 100755 --- a/Backup/.Backup_HD.sh +++ b/Backup/.Backup_HD.sh @@ -133,7 +133,8 @@ 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 & -/home/bruno/Apps/linuxShortcuts/ntfy.sh -t "Michelle Backup Completed!" a "floppy_disk" "Close the window and remove the disk..." >/dev/null 2>&1 & +/home/bruno/Apps/linuxShortcuts/ntfy.sh --title "Michelle Backup Completed\!" --tags "floppy_disk" "Close the window and remove the disk..." >/dev/null 2>&1 & + kdialog --title "Backup Complete" --msgbox "Backup finished successfully" echo echo "Backup on $device is finished. Press any key to close..." diff --git a/Backup/.lastDisk b/Backup/.lastDisk index d00491f..0cfbf08 100644 --- a/Backup/.lastDisk +++ b/Backup/.lastDisk @@ -1 +1 @@ -1 +2 diff --git a/Services/backup-contabo.sh b/Services/backup-contabo.sh index fa88220..b5f33a0 100755 --- a/Services/backup-contabo.sh +++ b/Services/backup-contabo.sh @@ -13,14 +13,17 @@ if [[ -z $CONTABO_BACKUP_PATH ]]; then fi sleep 60 +ntfy="/home/bruno/Apps/linuxShortcuts/ntfy.sh --title Backup" OXO_PATH="/home/bruno/Backups/OXOwebsite/" # Backup Contabo echo "Backuping Contabo..." +ntfy "Starting Contabo..." /bin/rsync --archive --backup --exclude "files/nextcloud*" --rsh=ssh backupContabo:/home/bruno/backups/* $CONTABO_BACKUP_PATH # Backup Gitea echo "Backuping Gitea..." +ntfy "Starting GoogleMicro..." /bin/rsync --archive --backup --rsh=ssh bkpgitea:/home/brunofontes/ttt/ /home/bruno/Backups/gitea/ # Backup OXO Files @@ -52,3 +55,4 @@ find $CONTABO_BACKUP_PATH/mail -type f -name "*.*" -mtime +20 -delete find $CONTABO_BACKUP_PATH/ -type f -name "*.*" -mtime +120 -delete find /home/bruno/Backups/gitea/ -type f -name "*.zip" -mtime +15 -delete +ntfy "Websites Backup Finished"