diff options
author | Aaron Ball <nullspoon@iohq.net> | 2015-09-24 16:21:02 -0600 |
---|---|---|
committer | Aaron Ball <nullspoon@iohq.net> | 2015-09-25 00:10:55 -0600 |
commit | 4c921d1dd9e16eb456da3e97d72aecb0881ff39d (patch) | |
tree | 7e66e633fbd643f239346aac2e299b8eb3d75bd5 /src/Performing_a_MySql_Backup_Via_Command_Line.ascii | |
parent | 161a81152e7b644444dea3000165f436d16ce3f5 (diff) | |
download | oper.io-4c921d1dd9e16eb456da3e97d72aecb0881ff39d.tar.gz oper.io-4c921d1dd9e16eb456da3e97d72aecb0881ff39d.tar.xz |
Initial conversion to php
Wrote index.php
Moved all asciidoc source files into new src directory
Created index.ascii for keeping track of post index (and allow for
drafts easily)
Updated styles to allow for styles unique to the index page
Fixed a few issues with various posts
Added tracking code
Diffstat (limited to 'src/Performing_a_MySql_Backup_Via_Command_Line.ascii')
-rw-r--r-- | src/Performing_a_MySql_Backup_Via_Command_Line.ascii | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/Performing_a_MySql_Backup_Via_Command_Line.ascii b/src/Performing_a_MySql_Backup_Via_Command_Line.ascii new file mode 100644 index 0000000..91e049e --- /dev/null +++ b/src/Performing_a_MySql_Backup_Via_Command_Line.ascii @@ -0,0 +1,42 @@ +Performing a MySql Backup Via Command Line +========================================== +:author: Aaron Ball +:email: nullspoon@iohq.net + + +== {doctitle} + +A few months back I was running backups of the ol' web server and realized that +it was going to be a pain since I was starting to host more and more websites. +Logging into phpMyAdmin and exporting every database can be a bit cumbersome +when you have a lot of databases. With that, I wanted a good solution for +dumping my entire database server. Thankfully, the solution is a really simple +one (if you have console access). Many thanks to the MySql devs for creating +this feature (as if they wouldn't what good is a database you can't back up +after all). + +As I mentioned, this is really simple. To export all of your databases +that you have running, including create statements, run the following +command... + +---- +mysqldump -u root -p --all-databases > /tmp/dumpfile.sql +---- + +So here's what we just did. + +* *-u* root specifies the user. In this case, root is who we are logging +in. +* *-p* makes it ask for a password (it will try to log in without using +a password if this isn't used) +* *--all-databases* makes it export all databases (duh) + +Ordinarily, this command outputs to the console. It's not the most useful thing +in the world unless you use the greater than. The > makes it write that output +to the specified location rather than to your console window. + + +Category:MySQL + + +// vim: set syntax=asciidoc: |