Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This file is licensed under the DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE Version 2, December 2004
- # See http://www.wtfpl.net/txt/copying/
- password=''
- mail=''
- date=$(date +%m_%d_%Y%H_%M_%S)
- mysqldump --add-drop-database --flush-privileges --all-databases -u root -p${password} > /backup/sql/${date}.sql
- echo "See the attachment for the backup. Have fun!"|mutt -s "MySQL backup" -a /backup/sql/${date}.sql ${mail}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement