Skip to content

Instantly share code, notes, and snippets.

View gmhabchi's full-sized avatar
☁️

Gerard Michael Habchi gmhabchi

☁️
View GitHub Profile
#!/bin/bash
sql_dump() {
echo "Performing mysqldump on database $DBNAME @ $HOST"
MYSQL_PWD=$PASSWORD mysqldump -h $HOST -P 3306 -u root $DBNAME > $DBNAME.sql
}
restore() {
echo "Performing restore on database $DBNAME @ $HOST"
MYSQL_PWD=$PASSWORD mysql -h $HOST -P 3306 -u root $DBNAME < $DBNAME.sql