]> arthur.barton.de Git - MkMySqlDump.git/commitdiff
Don't output command, it could contain passwords!
authorAlexander Barton <alex@barton.de>
Mon, 10 Aug 2015 09:04:14 +0000 (11:04 +0200)
committerAlexander Barton <alex@barton.de>
Mon, 10 Aug 2015 09:04:14 +0000 (11:04 +0200)
Instead of echoing the whole command, output the list of all
databases which will be saved.

bin/mkmysqldump

index cd0fac48db470ce56546782fbfdcbd0654620344..bd76518a710fa3497237949c92d34d8c8424a9fa 100755 (executable)
@@ -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)"