From 8e01bf64e1527c25dded47e497646c180ce418b7 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Mon, 10 Aug 2015 11:04:14 +0200 Subject: [PATCH] Don't output command, it could contain passwords! Instead of echoing the whole command, output the list of all databases which will be saved. --- bin/mkmysqldump | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bin/mkmysqldump b/bin/mkmysqldump index cd0fac4..bd76518 100755 --- a/bin/mkmysqldump +++ b/bin/mkmysqldump @@ -128,16 +128,19 @@ if [ $? -ne 0 ]; then exit 1 fi +echo "Will dump the following databases:" +for d in $DATABASES; do + echo " - $d" +done + echo "Dumping SQL data to file \"$OUTFILE\" ..." +echo "Start date: $(date)" CMD="mysqldump \ -h $MYHOST \ -u $MYUSER \ $PWSWITCH \ --master-data=1 \ --databases $DATABASES" - -echo "Start date: $(date)" -echo $CMD $CMD >"$OUTFILE"; r=$? if [ -n "$COMPRESS" -a -s "$OUTFILE" -a $r -eq 0 ]; then echo "Dump done: $(date)" -- 2.39.2