<?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>Linux, Programming, Telephony, Asterisk, Apache, Tips &#38; Tricks &#187; mysqlhotcopy</title>
	<atom:link href="http://shahidz.com/tag/mysqlhotcopy/feed/" rel="self" type="application/rss+xml" />
	<link>http://shahidz.com</link>
	<description>Passionate About Technology</description>
	<lastBuildDate>Wed, 18 Aug 2010 07:03:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Backuping &amp; Restoring using mysqldump &amp; mysqlhotcopy</title>
		<link>http://shahidz.com/backuping-restoring-using-mysqldump-mysqlhotcopy/</link>
		<comments>http://shahidz.com/backuping-restoring-using-mysqldump-mysqlhotcopy/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 04:38:00 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[backups]]></category>
		<category><![CDATA[mysql backups]]></category>
		<category><![CDATA[mysqldump]]></category>
		<category><![CDATA[mysqlhotcopy]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=15</guid>
		<description><![CDATA[Using mysqldump
Using &#8216;mysqldump&#8217; command you can take the mysql database backup. This command all the datas to a text file.
The syntax is
shell&#62; mysqldump [options] db_name [tables]
shell&#62; mysqldump [options] –databases db_name1 [db_name2 db_name3…]
shell&#62; mysqldump [options] –all-databases
Backuping Examples:
shell&#62; mysqldump -u root -p dbaseName &#62; file.sql;
shell&#62; Enter the password
Restoring Example:
Suppose, we have the database as file.sql, and we [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Using mysqldump</strong></p>
<p>Using &#8216;mysqldump&#8217; command you can take the mysql database backup. This command all the datas to a text file.</p>
<p>The syntax is</p>
<p>shell&gt; mysqldump [options] db_name [tables]<br />
shell&gt; mysqldump [options] –databases db_name1 [db_name2 db_name3…]<br />
shell&gt; mysqldump [options] –all-databases</p>
<p>Backuping Examples:</p>
<p>shell&gt; mysqldump -u root -p dbaseName &gt; file.sql;</p>
<p>shell&gt; Enter the password</p>
<p>Restoring Example:</p>
<p>Suppose, we have the database as file.sql, and we want to load it to the database, we can use &#8216;mysql&#8217; command to restore the database.</p>
<p>shell&gt; mysql -u root -p passwod dbaseName &lt; file.sql</p>
<p>shell&gt; Enter the password</p>
<p>Before executing this, make sure you are in the bin folder of mysql</p>
<p><strong>Using mysqlhotcopy</strong></p>
<p>Syntax:<br />
shell&gt;  mysqlhotcopy -u user <username> -p password dbname</p>
<password> <database> /backup/location/</database></password></username></p>
<p>Backuping Examples:<br />
shell&gt;  mysqlhotcopy -u user -p password mydb1 mydb2 /backup/location/</p>
<p>This will create a directory with the database name called ‘mydb1’ and &#8216;mydb2&#8242; in /backup/location/’</p>
<p>Restoring Example:<br />
To restore the backup you have to stop mysql using<br />
shell&gt; /etc/init.d/mysql stop</p>
<p>Then you have to copy the database backup file which is in the backup directory to the original mysql director which is ‘/var/lib/mysql/mysql1’</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fbackuping-restoring-using-mysqldump-mysqlhotcopy%2F&amp;linkname=Backuping%20%26%23038%3B%20Restoring%20using%20mysqldump%20%26%23038%3B%20mysqlhotcopy"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/backuping-restoring-using-mysqldump-mysqlhotcopy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
