Backup script updated

1. Moving message at the terminator command line, but inside the script
itself.

2. Fixing mail backup filename on line to delete old backups
This commit is contained in:
Bruno F. Fontes 2020-05-21 16:01:29 -03:00
parent 3a28251262
commit 95b5a30bce
Signed by: brunofontes
GPG Key ID: EE3447CE80048495
3 changed files with 7 additions and 4 deletions

View File

@ -67,3 +67,7 @@ echo -e "\e[97m`date +%r` - Backup finished. Please, verify your log files.\e[39
echo "$NextDisk" > .lastDisk echo "$NextDisk" > .lastDisk
kdialog --title "Backup Complete" --msgbox "Backup finished successfully" kdialog --title "Backup Complete" --msgbox "Backup finished successfully"
echo "Press any key to close"
read
exit

View File

@ -1,3 +1,2 @@
#!/usr/bin/bash terminator -m -T BACKUP -x sudo systemd-inhibit bash .Backup_HD_1TB.sh
terminator -m -T BACKUP -x sudo systemd-inhibit bash .Backup_HD_1TB.sh; echo; echo "Press enter key to close"; read exit

View File

@ -5,6 +5,6 @@ sleep 60
# Delete old backups # Delete old backups
find /home/bruno/Backups/Contabo/db -type f -name "*.sql.gz" -mtime +15 -delete find /home/bruno/Backups/Contabo/db -type f -name "*.sql.gz" -mtime +15 -delete
find /home/bruno/Backups/Contabo/files -type f -name "*.*" -mtime +35 -delete find /home/bruno/Backups/Contabo/files -type f -name "*.*" -mtime +35 -delete
find /home/bruno/Backups/Contabo/vmail -type f -name "*.*" -mtime +20 -delete find /home/bruno/Backups/Contabo/mail -type f -name "*.*" -mtime +20 -delete
find /home/bruno/Backups/Contabo/ -type f -name "*.*" -mtime +120 -delete find /home/bruno/Backups/Contabo/ -type f -name "*.*" -mtime +120 -delete