Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Update split-mysql-dump.rb #10

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

md2perpe
Copy link

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.

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.
@ripienaar
Copy link
Owner

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?

@md2perpe
Copy link
Author

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.

@ripienaar
Copy link
Owner

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?

@md2perpe
Copy link
Author

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.

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

Successfully merging this pull request may close these issues.

2 participants