mysql-dump-split icon indicating copy to clipboard operation
mysql-dump-split copied to clipboard

Update split-mysql-dump.rb

Open md2perpe opened this issue 12 years ago • 4 comments

Catch errors thrown from Dir.mkdir.

The script died for me because directories already existed. This helped.

I haven't investigated why I had several "Current Database" for the same database, so maybe the problem would better be solved in another way.

md2perpe avatar Mar 13 '13 16:03 md2perpe

Failing there has merit - to prevent accidentally overwriting a previous backup.

Do you feel that's a concern? Should it rather show a friendly error in that case?

ripienaar avatar Mar 13 '13 16:03 ripienaar

The error message was informative enough for me.

Maybe it would be a better solution to add a command line switch for allowing the script to overwrite existing files.

md2perpe avatar Mar 13 '13 17:03 md2perpe

yeah - so I am reluctant to merge this PR as it, because this will silently fail and overwrite data without warning.

do you have time to add such a flag?

ripienaar avatar Mar 13 '13 17:03 ripienaar

I'm not used to do programming in ruby, so I think that you would do it quicker and better. But if you don't have time, maybe I could try to do it.

md2perpe avatar Mar 13 '13 17:03 md2perpe