View .linux_auto_backup.sh
#!/bin/bash | |
#eseguo il backup | |
MESSAGE=$(/usr/bin/rsync -aAX / --exclude={"/dev/*","/proc/*","/sys/*","/tmp/*","/run/*","/mnt/*","/media/*","/lost+found"} /mnt/sda1/NomeCartella/ --stats -h) | |
#invio la notifica a telegram | |
curl -s -X POST "https://api.telegram.org/bot---telegram-key---/sendMessage" -F chat_id=---chat_id--- -F text="*Backup Automatico*: \`${MESSAGE}\`" -F parse_mode="MarkdownV2" |