From 3c4375e5bf35bcd0d5b21c37c060ec8f3b1e19f0 Mon Sep 17 00:00:00 2001 From: Clinton Ebadi Date: Fri, 25 Feb 2011 23:21:28 -0500 Subject: [PATCH] Update database backup script to connect to fritz * Mysql has to use a special my.cnf stored in /root --- hcoop-all-db-backup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hcoop-all-db-backup b/hcoop-all-db-backup index 33e79ab..1a1697f 100755 --- a/hcoop-all-db-backup +++ b/hcoop-all-db-backup @@ -13,9 +13,9 @@ if ! test -d "$BACKUP_ROOT"; then exit 1 fi -MYSQL_DBS=`sudo -H mysqlshow | tail -n +4 | head -n -1 | cut -d' ' -f 2 | xargs` +MYSQL_DBS=`sudo -H mysqlshow --defaults-file=/root/.my.fritz.cnf | tail -n +4 | head -n -1 | cut -d' ' -f 2 | xargs` echo "Mysql Databases are: $MYSQL_DBS" -PGSQL_DBS=`sudo -u postgres psql template1 -c '\l' | tail -n +4 | head -n -2 | cut -d' ' -f 2 | xargs` +PGSQL_DBS=`sudo -u postgres psql -h postgres template1 -c '\l' | tail -n +4 | head -n -2 | cut -d' ' -f 2 | xargs` echo "Postgres Databases are: $PGSQL_DBS" # Delete oldest -- 2.20.1