database 419 B

12345678910111213141516171819
  1. #!/bin/sh
  2. source /etc/clara.sh
  3. sql=`date '+%Y-%m-%d_%H-%M-%S'`.sql
  4. mysqldump --all-databases > $sql --user=$username --password $pas
  5. md5=$sql
  6. if [ "use_ftp" == "yes" ]
  7. then
  8. ./ftp $ftp_username $ftp_pas $ftp_server $sql
  9. else
  10. echo """
  11. hi
  12. i'm clara. a server Manager bot
  13. this is the Backup for your databases system
  14. file md5:
  15. $md5
  16. """|mutt -a $sql -s "database Backup for "`date '+%Y-%m-%d_%H-%M-%S'` -- $email
  17. fi
  18. rm $sql