...and pass the new db arguments to the commands to actually dump things
authorclinton_admin <clinton_admin@deleuze.hcoop.net>
Sat, 26 Feb 2011 05:01:24 +0000 (00:01 -0500)
committerclinton_admin <clinton_admin@deleuze.hcoop.net>
Sat, 26 Feb 2011 05:01:24 +0000 (00:01 -0500)
hcoop-all-db-backup

index 1a1697f..e4367e5 100755 (executable)
@@ -41,11 +41,11 @@ mkdir --mode=770 "$BACKUP_ROOT/mysql" "$BACKUP_ROOT/postgres"
 
 # Perform MYSQL backup
 for db in $MYSQL_DBS; do 
-       sudo -H mysqldump "$db" | gzip - > "$BACKUP_ROOT/mysql/$db.gz"
+       sudo -H mysqldump --defaults-file=/root/.my.fritz.cnf "$db" | gzip - > "$BACKUP_ROOT/mysql/$db.gz"
 done
 
 # Perform PGSQL backup
 for db in $PGSQL_DBS; do 
-       sudo -H -u postgres pg_dump "$db" | gzip - > "$BACKUP_ROOT/postgres/$db.gz"
+       sudo -H -u postgres pg_dump -h postgres "$db" | gzip - > "$BACKUP_ROOT/postgres/$db.gz"
 done