quickshiftin / mysqlbkup

Lightweight MySQL backup script in BASH
GNU Lesser General Public License v3.0
157 stars 70 forks source link

echoing password (line ~289) #3

Closed ryanyakich closed 10 years ago

ryanyakich commented 10 years ago

As a suggestion, maybe mask the password - there really is no reason to see it.

quickshiftin commented 10 years ago

How do you suggest masking it?

ryanyakich commented 10 years ago

Just a simple...

echo "Running: mysqldump -u $USER --password=**** -H $HOST $db | gzip > $backupDir/$backupFile"

(I am using the script in a cron on a dreamhost webserver, and it mails the output to me... I changed mine, so it was "masked" - even if I am the only one seeing it, I don't like seeing my passwords in plain text ;))

quickshiftin commented 10 years ago

Yup, that's bad! Wasn't looking at the script output, but rather the line actually doing the work. I've cleaned this up now too (on master).