Browse Source

Optimized backup script

main
Leo Maroni 1 year ago
parent
commit
3348ec1311
Signed by: em0lar GPG Key ID: B1ADA545CD2CBACD
  1. 8
      .backup.sh

8
.backup.sh

@ -8,19 +8,19 @@ then
exit 0
fi
date +%Y-%m-%d > ~/.backup/last_backup_asked
dialog --title "Run backup" --yesno "Do you want to backup now?" 7 60
response=$?
case $response in
0)
date +%Y-%m-%d > ~/.backup/last_backup_asked
echo "[.backup.sh] Run backup, please wait"
borgmatic
;;
1)
date +%Y-%m-%d > ~/.backup/last_backup_asked
echo "[.backup.sh] Do not run backup, I won't ask you until tomorrow"
;;
255)
echo "[.backup.sh] Do not run backup, I won't ask you until tomorrow"
;;
echo "[.backup.sh] Do not run backup, I will ask you again when you open the next shell"
;;
esac