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

No way to back up all MySQL databases #25

Open
dabeeeenster opened this issue Apr 14, 2011 · 2 comments
Open

No way to back up all MySQL databases #25

dabeeeenster opened this issue Apr 14, 2011 · 2 comments

Comments

@dabeeeenster
Copy link

Is this possible? Rather than explicitly listing them?

@vitaly
Copy link
Member

vitaly commented Apr 14, 2011

there is no 'native' way to do it in safe, but if you know little ruby you should remember that 'safe' config file is just a ruby file. so you have all the ruby power. smth like this should work:
echo 'show databases' | mysql -u root.split("\n")[1..-1].each { |dbname| ... }

we'll think about adding a cleaner way of doing it to safe.

@jeffleeismyhero
Copy link

The code vitaly contributed seems to have become mangled by Markdown. Here is another attempt:

`echo 'show databases' | mysql -u root`.split("\n")[1..-1].each { |dbname| database :"#{dbname}" }

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

No branches or pull requests

3 participants