Skip to content

Instantly share code, notes, and snippets.

@kwd
Forked from jnaskali/gist:2000041
Created July 20, 2012 08:22
Show Gist options
  • Save kwd/3149569 to your computer and use it in GitHub Desktop.
Save kwd/3149569 to your computer and use it in GitHub Desktop.
Bash: backup mysql database to email from ssh or cron
/bin/nice -n 19 mysqldump -e --user=DBUSER --password=DBPASS DATABASE | gzip | uuencode mysql_backup.gz | mail -s "Automatic mysql backup" your@email.com >/dev/null 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment