Created
September 22, 2017 10:58
-
-
Save witnessmenow/bc74ecb1ef20a99f88051e81e6504aeb to your computer and use it in GitHub Desktop.
Backup a file using telegram, backup runs every day at 2:30
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tar cvzf /home/huginn/backup.tar.gz /home/huginn/mysql-data | |
curl -F chat_id="-110696711" -F document=@"/home/huginn/backup.tar.gz" https://api.telegram.org/botTOken/sendDocument |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create the backup.sh file and paste in contents of the file | |
Edit the crontab: crontab -e | |
30 2 * * * /root/backup.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment