<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Andrew Beaton :: FAQ &#187; mysqldump</title>
	<atom:link href="http://andrewbeaton.net/faq/tag/mysqldump/feed/" rel="self" type="application/rss+xml" />
	<link>http://andrewbeaton.net/faq</link>
	<description>Tips from the world of a software developer</description>
	<lastBuildDate>Wed, 10 Mar 2010 21:03:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Backup a MySQL database</title>
		<link>http://andrewbeaton.net/faq/2009/11/27/backup-mysql-database/</link>
		<comments>http://andrewbeaton.net/faq/2009/11/27/backup-mysql-database/#comments</comments>
		<pubDate>Fri, 27 Nov 2009 20:10:24 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[mysqldump]]></category>

		<guid isPermaLink="false">http://andrewbeaton.net/faq/?p=65</guid>
		<description><![CDATA[I&#8217;ll just quickly cover some options here to backup a MySQL database. 
The first will output all the data and all the databases along with the schema:

mysqldump -u &#60;user&#62; -p -h &#60;hostname&#62; --all-databases &#62; all_databases.sql

The next option will output just the schema for all of the databases:

mysqldump -d -u &#60;user&#62; -p -h &#60;hostname&#62; --all-databases &#62; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll just quickly cover some options here to backup a MySQL database. </p>
<p>The first will output all the data and all the databases along with the schema:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-u</span> <span style="color: #000000; font-weight: bold;">&lt;</span>user<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-h</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">hostname</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">--all-databases</span> <span style="color: #000000; font-weight: bold;">&gt;</span> all_databases.sql</pre></div></div>

<p>The next option will output just the schema for all of the databases:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mysqldump <span style="color: #660033;">-d</span> <span style="color: #660033;">-u</span> <span style="color: #000000; font-weight: bold;">&lt;</span>user<span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">-p</span> <span style="color: #660033;">-h</span> <span style="color: #000000; font-weight: bold;">&lt;</span><span style="color: #c20cb9; font-weight: bold;">hostname</span><span style="color: #000000; font-weight: bold;">&gt;</span> <span style="color: #660033;">--all-databases</span> <span style="color: #000000; font-weight: bold;">&gt;</span> all_databases.sql</pre></div></div>

<p>Now we can use the same two methods above but replace &#8211;all-databases with the name of a database to output just one.</p>
]]></content:encoded>
			<wfw:commentRss>http://andrewbeaton.net/faq/2009/11/27/backup-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
