MySQL Export and Email Backup
Posted: June 17th, 2008 | Author: Ben | Filed under: Uncategorized |I installed this line of code in a crontab the other day. It exports the entire database (schema and data) to text, then emails it to you. Makes backing up easy.
mysqldump -h DB-SERVER -u DB-USERNAME –password=”DB-PASSWORD” DB-NAME | mail -s mysqlExport EMAIL-ADDRESS
To use, replace the fields (in caps) with your database info and run in a crontab.













[...] wrote a post about backing up databases to email a while ago, but didn’t really explain what could be [...]