commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Sometimes, I just want to back up a single client's databases. Fortunately, all clients have a set prefix to their database names. This makes my life easy! I just use 'CLIENTNAME_%' as my MYSQL_PATTERN in this command, and my life is suddenly easy.
-e - (optional) use extended insert.
-B - what follows is a list of databases
-v - (optional) give verbose output
-N - don't write column names in output (prevents us trying to back up a database called "Database").
There are 2 alternatives - vote for the best!
If you can do better, submit your command here.
You must be signed in to comment.