From: Alexander Barton Date: Mon, 10 Aug 2015 09:04:14 +0000 (+0200) Subject: Don't output command, it could contain passwords! X-Git-Url: https://arthur.barton.de/gitweb/?p=MkMySqlDump.git;a=commitdiff_plain;h=8e01bf64e1527c25dded47e497646c180ce418b7 Don't output command, it could contain passwords! Instead of echoing the whole command, output the list of all databases which will be saved. --- 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)"