<?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>Makura no Soshi &#187; Admin</title>
	<atom:link href="http://mschuette.name/wp/category/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://mschuette.name/wp</link>
	<description>枕草子</description>
	<lastBuildDate>Mon, 06 Feb 2012 12:41:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Domain-Umzug</title>
		<link>http://mschuette.name/wp/2012/01/domain-umzug/</link>
		<comments>http://mschuette.name/wp/2012/01/domain-umzug/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 06:13:03 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[Verschiedenes]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[domain]]></category>
		<category><![CDATA[imap]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mschuette.name]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[umzug]]></category>
		<category><![CDATA[vhost]]></category>
		<category><![CDATA[x509]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=777</guid>
		<description><![CDATA[Da ich nun nicht mehr Admin an der Uni Potsdam bin, habe ich jetzt auch meine Domain auf einen anderen Server umgezogen. – Falls irgendwelche Probleme auffallen schreibt mir bitte. Ein paar Beobachtungen dabei: Dovecot als IMAP-Server ist toll. Seine große Flexibilität führt zum typischen Problem dass man zu Beginn auch viel Konfigurationseinstellungen sichten muss. Wenn [...]]]></description>
			<content:encoded><![CDATA[<p>Da ich nun nicht mehr Admin an der Uni Potsdam bin, habe ich jetzt auch meine Domain auf einen anderen Server umgezogen. – Falls irgendwelche Probleme auffallen schreibt mir bitte.</p>
<p>Ein paar Beobachtungen dabei:</p>
<ul>
<li><a href="http://dovecot.org/">Dovecot</a> als IMAP-Server ist toll. Seine große Flexibilität führt zum typischen Problem dass man zu Beginn auch viel Konfigurationseinstellungen sichten muss. Wenn man weiß wo man hinwill merkt man aber dass nur wenige der Optionen auch benötigt werden.</li>
<li>Ein IPv6-Subnetz erlaubt schöne Setups mit eigener IP pro Dienst und IP-basierten VHosts auf dem Webserver. Leider ist&#8217;s nur bedingt praxistauglich wenn man nur eine vintage IP Adresse hat und auch darüber erreichbar sein möchte.</li>
<li>Mangels sinnvoller x.509-Infrastruktur benutze ich jetzt einfach weiter quasi-selbstsignierte Zertifikate. Wer&#8217;s über einen zweiten Kanal haben möchte findet das <a href="https://www.stud.uni-potsdam.de/~schuette/mschuette.name.crt">Zertifikat auch auf dem Studi-Server</a> (<code>SHA1 Fingerprint=­91:1B:DF:13:­F7:EF:E6:68:­E5:ED:27:39:­74:D2:46:B7:­8B:66:A8:44</code>).</li>
<li>Weder nginx noch lighttpd scheinen Authentifizierung mittels x509-Zertifikaten zu können (Zertifikat überprüfen geht anscheinend noch, aber das testen einzelner Einträge dann schon nicht mehr). Um schnell einen Webserver aufzusetzen würde ich weiterhin den Apache nehmen.</li>
<li>Es ist garnicht so einfach SpamAssassin in Betrieb zu nehmen&#8230; es dauert echt lange bis die 200 Spam-Mails zusammenkommen, die man so als Grundlage für den Bayes-Filter braucht.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2012/01/domain-umzug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sizing a Swap Partition</title>
		<link>http://mschuette.name/wp/2012/01/sizing-a-swap-partition/</link>
		<comments>http://mschuette.name/wp/2012/01/sizing-a-swap-partition/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 19:42:09 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[os]]></category>
		<category><![CDATA[partitioning]]></category>
		<category><![CDATA[swap]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=773</guid>
		<description><![CDATA[It is still one of the first questions when installing a unixoid OS: do you still need a swap partition and how big should you make it. In the old days™ this was an important question because disk space was expensive and the OS memory management had several constraints. Today both memory and disks are [...]]]></description>
			<content:encoded><![CDATA[<p>It is still one of the first questions when installing a unixoid OS: do you still need a swap partition and how big should you make it. In the old days™ this was an important question because disk space was expensive and the OS memory management had several constraints.</p>
<p>Today both memory and disks are cheap enough to make this question insignificant in many cases. One can usually buy enough memory to prevent swapping, and with terrabyte disks it makes no real difference whether the swap partition is 1 Gb or 4 Gb in size.</p>
<p>I still use the old rule of thumb and allocate twice the size of RAM for a swap partition. But the intention is not so much to swap memory pages but rather to always have enough space for kernel core dumps. My basic reasoning is:</p>
<ol>
<li>In case of kernel errors I want to get a core dump.</li>
<li>A later RAM upgrade is relatively cheap and easy, thus probable over a system&#8217;s lifetime.</li>
<li>A later disk re-partitioning is more difficult, thus to avoid.</li>
<li>Disk space is cheap, allocating ≤ 5% for a mostly unused swap partition has no significant cost.</li>
</ol>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2012/01/sizing-a-swap-partition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dying &#8216;try&#8217; processes</title>
		<link>http://mschuette.name/wp/2011/11/dying-try-processes/</link>
		<comments>http://mschuette.name/wp/2011/11/dying-try-processes/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 06:51:17 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[Syslog]]></category>
		<category><![CDATA[amd64]]></category>
		<category><![CDATA[i386]]></category>
		<category><![CDATA[try]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=736</guid>
		<description><![CDATA[Note: This syslog entry is puzzling if the system has no program named try, but no cause for concern: 2011-11-19T01:31:21 frodo kernel: pid 47812 (try), uid 0: exited on signal 10 (core dumped) Source of the program is Perl&#8217;s Configure script, which compiles its C library test cases into programs named try. And apparently amd64 [...]]]></description>
			<content:encoded><![CDATA[<p>Note: This syslog entry is puzzling if the system has no program named <code>try</code>, but no cause for concern:</p>
<blockquote><p><code>2011-11-19T01:31:21 frodo kernel: pid 47812 (try), uid 0: exited on signal 10 (core dumped)</code></p></blockquote>
<p>Source of the program is Perl&#8217;s Configure script, which compiles its C library test cases into programs named <code>try</code>. And apparently amd64 systems need to use the function <code>va_copy()</code> because the test case without this function leads to a segfault.</p>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2011/11/dying-try-processes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPv6-Tag geplottet</title>
		<link>http://mschuette.name/wp/2011/06/ipv6-tag-geplottet/</link>
		<comments>http://mschuette.name/wp/2011/06/ipv6-tag-geplottet/#comments</comments>
		<pubDate>Mon, 13 Jun 2011 14:13:25 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Uni]]></category>
		<category><![CDATA[gnuplot]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[statistics]]></category>
		<category><![CDATA[tcpdump]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=678</guid>
		<description><![CDATA[Durch eine Verkettung von Zufällen konnte ich letzte Woche im Uni-Teilnetz in dem dieser Server steht einige Tage lang tcpdump laufen lassen. Dabei habe ich gerade eben noch den IPv6-Tag miterfasst und das ist auch der einzige Tag, an dem sich IPv6-Werte finden, die höher sind als die IPv4-Werte. Für brauchbare Statistiken müsste man noch [...]]]></description>
			<content:encoded><![CDATA[<p>Durch eine Verkettung von Zufällen konnte ich letzte Woche im Uni-Teilnetz in dem dieser Server steht einige Tage lang <code>tcpdump</code> laufen lassen. Dabei habe ich gerade eben noch den IPv6-Tag miterfasst und das ist auch der einzige Tag, an dem sich IPv6-Werte finden, die höher sind als die IPv4-Werte.</p>
<p><a href="/wp/wp-upload/gnuplot_ipv6day.png"><img class="alignnone" src="/wp/wp-upload/gnuplot_ipv6day_small.png" alt="" width="300" height="158" /></a></p>
<p>Für brauchbare Statistiken müsste man noch einen Arbeitstag  rein­stecken (Ein- und Ausgang trennen, PC/Server-Traffic unterscheiden,  IPv6-Bias durch Neighbor Discovery rausfiltern, die verlorenen  Messpunkte am 8.6. wiederherzaubern ;). Aber bunte gnuplot-Graphen sind ja auch für sich immer schön.</p>
<p>Ich würde ich die Verteilung auch gerne kontinuierlich erfassen, aber der  benutzte Switch möchte mir per SNMP leider nicht mitteilen welche  Protokolle er so weiterleitet. &#8220;Wenn mal Zeit ist&#8221; muss ich nochmal den MIB durchsuchen&#8230;</p>
<p>Noch was zur Datenerfassung: Die Anleitung &#8220;<a href="http://wiki.wireshark.org/KnownBugs/OutOfMemory?action=AttachFile&amp;do=get&amp;target=Using+Wireshark+to+Create+Network-Usage+Baselines.pdf">Using Wireshark to Create Network-Usage Baselines</a>&#8221; zu <code>tcpdump</code> und <code>tshark</code> ist hilfreich. Leider schreibt <code>tshark</code> keine Unix-Zeitstempel in seine Ausgabe &#8212; die müssen noch per <a href="/wp/wp-upload/tshark_mergestats.py">Skript</a> ergänzt werden.</p>
<p><strong>[Update:]</strong> Die Daten „großer“ Anbieter sind natürlich auch interessant. Igor Gashinsky von Yahoo berichtete auf der <a href="http://www.nanog.org/meetings/nanog52/index.php">NANOG52</a> vom IPv6-Tag und stellt fest: “That was a lot of work for 0.229%!”<br />
<a href="/wp/wp-upload/yahoo_ipv6day.png"><img class="alignnone" src="/wp/wp-upload/yahoo_ipv6day_small.png" alt="" width="300" height="225" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2011/06/ipv6-tag-geplottet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Procrastination @ work</title>
		<link>http://mschuette.name/wp/2011/04/procrastination-work/</link>
		<comments>http://mschuette.name/wp/2011/04/procrastination-work/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 10:58:23 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[E-Mail]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[rrd]]></category>
		<category><![CDATA[rrdtool]]></category>
		<category><![CDATA[score]]></category>
		<category><![CDATA[spam]]></category>
		<category><![CDATA[spamassassin]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=662</guid>
		<description><![CDATA[erfassen wir doch mal die SpamAssassin-Scores&#8230; &#160;]]></description>
			<content:encoded><![CDATA[<p>erfassen wir doch mal die SpamAssassin-Scores&#8230;</p>
<p style="text-align: left;"><img class="alignleft" title="SA Scores absolut" src="https://mschuette.name/wp/wp-upload/sa-score_abs-20110419.png" alt="SA Scores absolut" width="582" height="223" /></p>
<p><img class="alignleft" title="SA Scores relativ" src="https://mschuette.name/wp/wp-upload/sa-score_rel-20110419.png" alt="SA Scores relativ" width="582" height="223" /></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2011/04/procrastination-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSSL und so</title>
		<link>http://mschuette.name/wp/2011/04/openssl-und-so/</link>
		<comments>http://mschuette.name/wp/2011/04/openssl-und-so/#comments</comments>
		<pubDate>Mon, 11 Apr 2011 20:40:04 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[cert]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[openssl]]></category>
		<category><![CDATA[x509]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=655</guid>
		<description><![CDATA[OpenSSL ist beständiger Quell der Verzweiflung für alle Netzwerk-Programmierer und Admins. Noch steigern lässt sich der Spaß aber mit zwei parallel installierten OpenSSL-Versionen (unter BSD häufig anzutreffen, weil das OS noch v0.9.x mitbringt und man sich dann ein v1.0.x aus den Ports dazuinstalliert). Mit der Kombination musste ich letztens feststellen dass sich das benutzte Hash-Verfahren für [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://openssl.org/">OpenSSL</a> ist beständiger Quell der Verzweiflung für alle Netzwerk-Programmierer und Admins. Noch steigern lässt sich der Spaß aber mit zwei parallel installierten OpenSSL-Versionen (unter BSD häufig anzutreffen, weil das OS noch v0.9.x mitbringt und man sich dann ein v1.0.x aus den Ports dazuinstalliert).</p>
<p>Mit der Kombination musste ich letztens feststellen dass sich das benutzte Hash-Verfahren für X.509-Zertifikate änderte:</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family:monospace;">&amp;gt; /usr/bin/openssl version ; 
/usr/local/bin/openssl version
OpenSSL 0.9.8q 2 Dec 2010
OpenSSL 1.0.0d 8 Feb 2011
&amp;gt; /usr/bin/openssl x509 -noout -hash -in astaca.pem ; 
/usr/local/bin/openssl x509 -noout -hash -in astaca.pem
a3a544f7
aff0606f</pre></div></div>

<p>Das führte dann dazu dass eine Anwendung meine (im CApath-format hinterlegte) CA nicht benutzen wollte, obwohl beim ausführlichsten Test mit <code>openssl {verify,s_client|s_server}</code> alles bestens funktionierte. <code>:-/</code></p>
<p>Als eigentliches Problem entpuppte sich letztlich ein falscher <code>$PATH</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="sh" style="font-family:monospace;">&amp;gt; which openssl
/usr/bin/openssl</pre></div></div>

<p>Der insofern &#8216;falsch&#8217; ist als dass die Anwendung halt gegen die nachinstallierte v1.0 in <code>/usr/local</code> gelinkt ist. Aber darauf muss man erstmal kommen&#8230; ein Test mit <code>/usr/local/bin/openssl verify</code> hätte echt viel Zeit gespart.</p>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2011/04/openssl-und-so/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP/CGI und die Internal Server Errors</title>
		<link>http://mschuette.name/wp/2010/09/phpcgi-und-die-internal-server-errors/</link>
		<comments>http://mschuette.name/wp/2010/09/phpcgi-und-die-internal-server-errors/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 22:34:59 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[500]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[internal server error]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=604</guid>
		<description><![CDATA[Falls er per (F)CGI eingebundene PHP-Interpreter viele &#8220;Internal Server Errors&#8221; verursacht, sich aber im Apache-Log keine Fehlermeldung findet&#8230; dann sollte man nachsehen ob die PHP-Prozesse überhaupt durchlaufen oder aber abstürzen. Falls nämlich das Kernel-Log von SIGABRTs berichtet und überall Core-Dumps rumliegen, dann kann man sich langes rumschrauben am Logging sparen und stattdessen gleich die fehlerhafte [...]]]></description>
			<content:encoded><![CDATA[<p>Falls er per (F)CGI eingebundene PHP-Interpreter viele &#8220;Internal Server Errors&#8221; verursacht, sich aber im Apache-Log keine Fehlermeldung findet&#8230; dann sollte man nachsehen ob die PHP-Prozesse überhaupt durchlaufen oder aber abstürzen.<br />
Falls nämlich das Kernel-Log von SIGABRTs berichtet und überall Core-Dumps rumliegen, dann kann man sich langes rumschrauben am Logging sparen und stattdessen gleich die fehlerhafte PHP-Extension suchen und neuinstallieren.</p>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2010/09/phpcgi-und-die-internal-server-errors/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>M0n0wall vs. pfSense vs. NanoBSD</title>
		<link>http://mschuette.name/wp/2010/06/m0n0wall-vs-pfsense-vs-nanobsd/</link>
		<comments>http://mschuette.name/wp/2010/06/m0n0wall-vs-pfsense-vs-nanobsd/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 23:10:02 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[BSD]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[appliance]]></category>
		<category><![CDATA[bridge]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[ipv6]]></category>
		<category><![CDATA[m0n0wall]]></category>
		<category><![CDATA[nanobsd]]></category>
		<category><![CDATA[packet filter]]></category>
		<category><![CDATA[pf]]></category>
		<category><![CDATA[pfsense]]></category>
		<category><![CDATA[soekris]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=570</guid>
		<description><![CDATA[Recently I replaced my office&#8217;s filtering network bridge which still ran on an old FreeBSD 4.11 box for the last eight years or so. The new system is based on a Soekris 5501, and because it took some time to choose the right software I decided to publish my notes on the tested BSD firewall [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I replaced my office&#8217;s filtering network bridge which still ran on an old FreeBSD 4.11 box for the last eight years or so. The new system is based on a <a href="http://soekris.com/net5501.htm">Soekris 5501</a>, and because it took some time to choose the right software I decided to publish my notes on the tested BSD firewall products.</p>
<p><a href="http://m0n0.ch/wall/">M0n0wall</a>: I have already used this as a NAT router and liked the web-based configuration (which I percieved as convenient but not limiting), so it was the first candidate. But I found it to be &#8216;too small&#8217; for my plans. It allows neither the installation of additional software, nor does it allow ssh login for scriptable configuration changes. It also does not use <a href="http://www.openbsd.org/faq/pf/">pf</a>, which I tend to prefer for its concise configuration and dynamic tables.</p>
<p><a href="http://pfsense.org/">pfSense</a>: M0n0wall&#8217;s big brother; bigger, more complete, and more customizable. But with one major problem: no IPv6 support. It is 2010, with only 1-2 years until the <a href="http://www.potaroo.net/tools/ipv4/">IPv4 address pool exhaustion</a>&#8230; deploying network infrastructure without IPv6 support is ridiculous and not an option. – Another problem seems to be a limited support for bridge setups: There are always a number of standard pf rules, which are hard to circumvent in case of problems. I nearly settled to use the web-interface for IPv4, and insert my own IPv6 rules into the PHP scripts. But this would have made it even harder to maintain than a solution without any web-interface.</p>
<p><a href="http://www.freebsd.org/doc/en/articles/nanobsd/index.html">NanoBSD</a>: So I finally took the chance to build my own small FreeBSD system for the task. NanoBSD is basically a script to do a FreeBSD &#8216;make world&#8217;, allow for some customization, and finally put everything into a CF-ready disk image. Of course the first attempt required several changes after installation (it&#8217;s really hard to think of all configuration steps beforehand), but everything went well without major problems.</p>
<p>Thus I chose NanoBSD. YMMV, and I would not recommend it for anyone not familiar with BSD. – But with four other BSD servers the additional maintenance effort is really small; possibly even easier than with any non-standard or web-based configuration.</p>
<p>[<strong>Update, 2011-02-24</strong>: If you use NanoBSD yourself then take a look at the useful <a href="http://bsdrp.net/documentation/technical_docs/nanobsd#bsdrp_patches_for_nanobsd">scripts and patches from BSDRP</a>.] </p>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2010/06/m0n0wall-vs-pfsense-vs-nanobsd/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>New Mailman Logo</title>
		<link>http://mschuette.name/wp/2010/05/new-mailman-logo/</link>
		<comments>http://mschuette.name/wp/2010/05/new-mailman-logo/#comments</comments>
		<pubDate>Thu, 27 May 2010 00:14:15 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[Mailman]]></category>
		<category><![CDATA[logo]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=564</guid>
		<description><![CDATA[I like the new logo for Mailman.]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" title="GNU Mailman Logo" src="/wp/wp-upload/mailman_logo_2010.jpg" alt="GNU Mailman Logo" width="301" height="125" /></p>
<p style="text-align: center;">I like the <a href="http://www.wefearchange.org/2010/05/we-have-winner.html">new logo</a> for <a href="http://www.list.org/">Mailman</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2010/05/new-mailman-logo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tips for handling big SQL dumps</title>
		<link>http://mschuette.name/wp/2010/05/tips-for-handling-big-sql-dumps/</link>
		<comments>http://mschuette.name/wp/2010/05/tips-for-handling-big-sql-dumps/#comments</comments>
		<pubDate>Sat, 15 May 2010 17:19:08 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
				<category><![CDATA[Admin]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">https://mschuette.name/wp/?p=553</guid>
		<description><![CDATA[Recently I had to work with SQL dumps to recover a database server and to update a MySQL installation. Because complete SQL dumps are too big to handle them with diff and vi (with enough memory vim actually works on large files, but it is really slow) I needed more traditional tools to compare them [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had to work with SQL dumps to recover a database server and to update a MySQL installation. Because complete SQL dumps are too big to handle them with <code>diff</code> and <code>vi</code> (with enough memory <code>vim</code> actually works on large files, but it is really slow) I needed more traditional tools to compare them and to extract only the parts I needed.</p>
<p>To extract single DB dumps from a complete dump find the line numbers where the single DB dumps start. Then use <code>sed</code> to print only the lines from the start of the searched DB and the next one. <code>mysqldump</code> seems to use separate passes for data, stored routines, and  triggers &#8212; so there may be multiple ranges of lines in a complete  dump:</p>
<blockquote>
<pre>fgrep -n 'Current Database: ' dump_all.sql
sed -n -e '86226,93282p' -e '123249,123254p'
  dump_all.sql &gt; db_test.sql
</pre>
</blockquote>
<p><code>diff</code> loads the files it works on into memory, thus it cannot be used for large files (&gt;= 1Gb). To extract multiple DBs or to compare dumps it is useful to <code>split</code> the SQL dump at DB boundaries:</p>
<blockquote>
<pre>split -p 'Current Database: ' dump_all.sql</pre>
</blockquote>
<p>The resulting partial files can be renamed/concatenated to one file per DB (using tcsh syntax here):</p>
<blockquote>
<pre>foreach f ( x?? )
  set dbname=`head -1 $f
  | sed -e 's/^-- Current Database: .(.*).$/1/'
    -e 's/^-- MySQL dump.*$/dumpheader/'`
  test $dbname &amp;&amp; cat $f &gt;&gt; part-${dbname} &amp;&amp; rm $f
end
</pre>
</blockquote>
<p>If we did this with two SQL dumps in $dir1 and $dir2, then we can compare them chunk by chunk (assuming every DB on itself is small enough to fit into memory for diff):</p>
<blockquote>
<pre>foreach f ($dir1/part-*)
  diff --ignore-case --ignore-space-change
    --ignore-blank-lines -u
    $dir1/$f $dir2/$f &gt;&gt; /tmp/diff.out
end
</pre>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://mschuette.name/wp/2010/05/tips-for-handling-big-sql-dumps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

