Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /bin/bash
- YELLOW="\033[1;33m"
- RED="\033[0;31m"
- ENDCOLOR="\033[0m"
- ## pack files
- echo -e $YELLOW"Packing files..."$ENDCOLOR
- cd /home/user/textfolder/
- tar cvf /home/user/yourtext-backup.tar *.*
- echo -e $YELLOW"... files packed!"$ENDCOLOR
- ## list packed file
- echo -e $YELLOW"Contents of yourtext-backup.tar:"$ENDCOLOR
- tar tvf /home/user/yourtext-backup.tar
- ## send packed file
- echo -e $YELLOW"Sending packed file..."$ENDCOLOR
- sendEmail -f backupemail@gmail.com -t youremail@gmail.com -u "Current backup" -m "Backup" -a /home/user/yourtext-backup.tar -s smtp.gmail.com:25 -xu backupemail -xp password
- echo -e $YELLOW"... Backup done!"$ENDCOLOR
- cd -
- ## This script is released under the WTFPL 2.0. Modify and distribute as you wish.
- ## The script needs the sendemail program to work.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement