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

Comments

Projects
None yet
2 participants
@andrelopez

andrelopez commented Sep 15, 2017

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

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Sep 16, 2017

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

Owner

sebastianfeldmann commented Sep 16, 2017

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

@sebastianfeldmann sebastianfeldmann self-assigned this Sep 16, 2017

@andrelopez

This comment has been minimized.

Show comment
Hide comment
@andrelopez

andrelopez 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.

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

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Sep 18, 2017

Owner

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

Owner

sebastianfeldmann commented Sep 18, 2017

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

@sebastianfeldmann

This comment has been minimized.

Show comment
Hide comment
@sebastianfeldmann

sebastianfeldmann Sep 18, 2017

Owner

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

Owner

sebastianfeldmann commented Sep 18, 2017

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