Has anyone got a one liner (command line) that will dump all databases to seperate dump files e.g.
forumdb.dump
wikidb.dump
etc.
|
Has anyone got a one liner (command line) that will dump all databases to seperate dump files e.g.
| |||
|
feedback
|
|
Why not, still a long one liner though :)
Make sure to replace the XXXX with the correct mysql root password and the verbose option in the mysqldump is optional as well. | |||||
feedback
|
|
can do this
Basically list all the directories in the data directory, and then just dump them. I've done the above in a pinch if I didn't have a jobs set to backup individual files. | |||
|
feedback
|
|
I don't believe there is a good one-liner, but here is a script fragment. You might be able to adapt this to your usage. If you want to hard-code your database list, you could probably get it down to a one-liner. But I needed something that would be able to handle database adds and drops.
| |||
|
feedback
|