Skip to content

Instantly share code, notes, and snippets.

@AlexanderS
Forked from slomo/backup-mysql.sh
Created February 9, 2012 23:18
Show Gist options
  • Save AlexanderS/1784184 to your computer and use it in GitHub Desktop.
Save AlexanderS/1784184 to your computer and use it in GitHub Desktop.
#!/bin/bash
TARGET="$HOME/test"
egrep -v "^(#|\\s*$)" ./enabledDBs | while read DATABASE ; do
mysqldump "${DATABASE}" > "${TARGET}/${DATABASE}.mysql"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment