Skip to content

Instantly share code, notes, and snippets.

@jnaskali
Created March 8, 2012 09:54
Show Gist options
  • Save jnaskali/2000041 to your computer and use it in GitHub Desktop.
Save jnaskali/2000041 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