Skip to content

Instantly share code, notes, and snippets.

@smerrill
Created June 4, 2010 03:28
Show Gist options
  • Save smerrill/424894 to your computer and use it in GitHub Desktop.
Save smerrill/424894 to your computer and use it in GitHub Desktop.
#!/bin/bash
date=`date "+%Y-%m-%d"`
for i in /Applications/MAMP/db/mysql/*/; do
dbname=`basename $i`
/Applications/MAMP/Library/bin/mysqldump -uroot $dbname > ~/hdd-smerrill/Documents/Backups/$dbname-$date.sql
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment