Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysqldump port option #117

Closed
andrelopez opened this issue Sep 15, 2017 · 4 comments
Closed

Mysqldump port option #117

andrelopez opened this issue Sep 15, 2017 · 4 comments
Assignees

Comments

@andrelopez
Copy link

Hi Sebastian!

Could we add support for port option on mysqldump as in the pgdump ?

Other quick question: Is there a way to avoid the "debug" key on the log file? because is showing the mysql user and password for some reason and I think that is not a good idea or just show something like user: xxx, password: xxxx (I mean shows the entire mysqldump command). I have tried 'verbose' => false and debug => false on the phpbu command line tag and haven't had luck.

Thanks a lot!

@sebastianfeldmann
Copy link
Owner

Hi,
adding a port option should not be a problem.
For the password thing, this should not happen :/
I'll try to reproduce this and fix this immediately.
Maybe you can share how you execute phpbu (MySQL config, phpbu CLI options) and where you see the password in clear text.
Cheers Sebastian

@andrelopez
Copy link
Author

andrelopez commented Sep 17, 2017

Hi Sebastian,

I have executed phpbu with the next command using the proc_open function (if is disabled I use exec) on php:

cd /var/www/html/website/vendor/plugin/backup/src/resources && php phpbu5.phar --configuration=/var/www/html/website/storage/logs/config.json

config.json
{"verbose":false,"logging":[{"type":"json","target":"\/var\/www\/html\/website\/storage\/logs\/dbs\/website_20170914091656_sowqisrsam.log"},{"type":"webhook","options":{"uri":"http:\/\/website.dev\/webhook\/finished"}}],"backups":[{"name":"Database","source":{"type":"mysqldump","options":{"host":"localhost","databases":"website","user":"root","password":"root"}},"target":{"dirname":"\/var\/www\/html\/website\/storage\/dbs\/databases\/","filename":"database-website_20170914091656_sowqisrsam.sql"},"syncs":[{"type":"dropbox","options":{"token":"secret","path":"\/dbs\/website_20170914091656_sowqisrsam"}}]}]}

log.log
{"status":0,"timestamp":1505405817,"duration":8.5058,"backupCount":1,"backupFailed":0,"errorCount":0,"errors":[],"backups":[{"name":"Database","status":0,"checks":{"executed":0,"failed":0},"crypt":{"executed":0,"skipped":0,"failed":0},"syncs":{"executed":1,"skipped":0,"failed":0},"cleanup":{"executed":0,"skipped":0,"failed":0}}],"debug":["\/usr\/bin\/mysqldump --user='root' --password='root' --host='localhost' 'website' > \/var\/www\/html\/website\/storage\/dbs\/databases\/database-website_20170914091656_sowqisrsam.sql","upload: done (144018)"]}

There is an option on mysqldump called: --defaults-extra-file so we can pass the credentials into a file instead of the console what do you think? please let me know if you need more info.

@sebastianfeldmann
Copy link
Owner

sebastianfeldmann commented Sep 18, 2017

I created a separate bug for the masking issue. issue #118

@sebastianfeldmann
Copy link
Owner

I added the 'port' option to the latest version 5.0.3 that got release a couple of minutes ago ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants