<?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>mysqldump Архиви - rosen4o.net</title>
	<atom:link href="https://rosen4o.net/tag/mysqldump/feed/" rel="self" type="application/rss+xml" />
	<link>https://rosen4o.net/tag/mysqldump/</link>
	<description></description>
	<lastBuildDate>Tue, 06 Aug 2013 12:57:07 +0000</lastBuildDate>
	<language>bg-BG</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>mysql export every table in different file</title>
		<link>https://rosen4o.net/2013/08/06/mysql-export-every-table-in-different-file/</link>
					<comments>https://rosen4o.net/2013/08/06/mysql-export-every-table-in-different-file/#respond</comments>
		
		<dc:creator><![CDATA[rosen4o]]></dc:creator>
		<pubDate>Tue, 06 Aug 2013 12:47:03 +0000</pubDate>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[export]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysqldump]]></category>
		<guid isPermaLink="false">http://rosen4o.net/?p=933</guid>

					<description><![CDATA[<p>#!/bin/bash # dump-tables-mysql.sh # Descr: Dump MySQL table data into separate SQL files for a specified database. # Usage: Run without args for usage info. # Author: @Trutane # Ref: http://stackoverflow.com/q/3669121/138325 # Notes: # * Script will prompt for password<span class="ellipsis">&#8230;</span></p>
<div class="read-more"><a href="https://rosen4o.net/2013/08/06/mysql-export-every-table-in-different-file/">Прочетете повече ›</a></div>
<p><!-- end of .read-more --></p>
<p>Материалът <a href="https://rosen4o.net/2013/08/06/mysql-export-every-table-in-different-file/">mysql export every table in different file</a> е публикуван за пръв път на <a href="https://rosen4o.net">rosen4o.net</a>.</p>
]]></description>
										<content:encoded><![CDATA[<pre><code>#!/bin/bash

# dump-tables-mysql.sh
# Descr: Dump MySQL table data into separate SQL files for a specified database.
# Usage: Run without args for usage info.
# Author: @Trutane
# Ref: http://stackoverflow.com/q/3669121/138325
# Notes:
#  * Script will prompt for password for db access.
#  * Output files are compressed and saved in the current working dir, unless DIR is
#    specified on command-line.

[ $# -lt 3 ] &amp;&amp; echo "Usage: $(basename $0) &lt;DB_HOST&gt; &lt;DB_USER&gt; &lt;DB_NAME&gt; [&lt;DIR&gt;]" &amp;&amp; exit 1

DB_host=$1
DB_user=$2
DB=$3
DIR=$4

[ -n "$DIR" ] || DIR=.
test -d $DIR || mkdir -p $DIR

echo -n "DB password: "
read -s DB_pass
echo
echo "Dumping tables into separate SQL command files for database '$DB' into dir=$DIR"

tbl_count=0

for t in $(mysql -NBA -h $DB_host -u $DB_user -p$DB_pass -D $DB -e 'show tables') 
do 
    echo "DUMPING TABLE: $t"
    mysqldump -h $DB_host -u $DB_user -p$DB_pass $DB $t | gzip &gt; $DIR/$t.sql.gz
    (( tbl_count++ ))
done

echo "$tbl_count tables dumped from database '$DB' into dir=$DIR"</code></pre>
<p>Материалът <a href="https://rosen4o.net/2013/08/06/mysql-export-every-table-in-different-file/">mysql export every table in different file</a> е публикуван за пръв път на <a href="https://rosen4o.net">rosen4o.net</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://rosen4o.net/2013/08/06/mysql-export-every-table-in-different-file/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
