<?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>perpetual beta &#124; release &#187; Command Line</title>
	<atom:link href="http://perpetualbeta.com/release/category/computers/unixlinux/feed/" rel="self" type="application/rss+xml" />
	<link>http://perpetualbeta.com/release</link>
	<description>ready... aim...</description>
	<lastBuildDate>Thu, 06 Oct 2011 18:36:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>Database Resurrection</title>
		<link>http://perpetualbeta.com/release/2005/11/database-resurrection/</link>
		<comments>http://perpetualbeta.com/release/2005/11/database-resurrection/#comments</comments>
		<pubDate>Tue, 22 Nov 2005 04:45:49 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Command Line]]></category>
		<category><![CDATA[The Joy of Tech]]></category>
		<category><![CDATA[Webloggia]]></category>

		<guid isPermaLink="false">http://www.perpetualbeta.com/release/?p=8</guid>
		<description><![CDATA[Sometime last July, the Movable Type setup that powered every weblog on our various domains went belly up. All logins failed, password retrievals failed&#8230; the database appeared to be empty. But the database was still there, and still flush with all that data. Logging into the web server and running &#8220;strings&#8221; on the database files [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Sometime last July, the Movable Type setup that powered every weblog on our various domains <a href="http://www.wasylik.net/baby/blog/">went belly up</a>.  All logins failed, password retrievals failed&#8230;  the database appeared to be empty.  But the database was still there, and still flush with all that data.  Logging into the web server and running &#8220;strings&#8221; on the database files showed that all the user accounts and blog entries were still there.  So my problem was not that the database was gone &#8211; it was that Movable Type somehow couldn&#8217;t access the data.  I backed up the errant database and went poking around.  </p>
<p>I tried re-installing Movable Type from scratch, using the original install files I had stashed away.  Still no dice:  &#8220;invalid login.&#8221;  I did a new install of a blank Movable Type setup &#8211; worked like a charm.  That told me I definitely had a database problem, not a problem with the install files.   The <a href="http://www.google.com/search?q=movable.type+invalid+login&#038;hl=en&#038;lr=&#038;safe=off&#038;client=safari&#038;rls=en&#038;start=10&#038;sa=N">Oracle of Google</a> told me that others had suffered the same problem:</p>
<ul>
<li><a href="http://www.sixapart.com/movabletype/forums/lofiversion/index.php/t25580.html">http://www.sixapart.com/movabletype/forums/lofiversion/index.php/t25580.html</a></li>
<li><a href="http://www.djchuang.com/b2/blog.php/2004/05/18/">http://www.djchuang.com/b2/blog.php/2004/05/18/</a></li>
<li><a href="http://www.sixapart.com/movabletype/forums/index.php?showtopic=41725">http://www.sixapart.com/movabletype/forums/index.php?showtopic=41725</a></li>
</ul>
<p><a href="http://www.sixapart.com/movabletype/kb/authors/invalid_login.html">One of the posts</a> I ran across recommended the <a href="http://www.nonplus.net/software/mt/MT-Medic.htm">MT-Medic plugin</a>.  Sounded great &#8211; I installed it, then configured and ran it.  Same result:  no authors, no weblogs.  But I knew, having seen the data, that it was all still there. The same post that mentioned MT-Medic also contained the following nuggets of information:</p>
<blockquote><p>This can be fixed by converting the DB files over to the format used by the new library version; please review the Knowledge Base article on Converting Berkeley DB Files To New Version for more information.</p></blockquote>
<p>It linked to an entry on <a href="http://www.sixapart.com/movabletype/kb/databases/converting_berk.html">upgrading the database version</a>.  &#8220;The easiest way to convert the DB files is to use the db_upgrade program.&#8221;  Great!  I could just run the &#8220;db_upgrade&#8221; command.  Except&#8230; no such program existed on my server!  So I then tried the burdensome &#8220;dump and reload&#8221; method at the end of the article.  After laboriously typing in</p>
<pre>$ db_dump -f author.db.data author.db
$ mv author.db author.db.old
$ db_load -f author.db.data author.db
$ chmod 666 author.db</pre>
<p>&#8230;for more than two dozen files, I thought I was ready to go.  I fired up the login window&#8230;  INVALID LOGIN.  </p>
<p>Now I was mad.  But one guy, Dylan Parker <a href="http://blog.warmbrain.com/2004/Feb/2004Feb05_corrupted_movable_type_database.html">seemed to be having the same types of troubles</a> I was having, and he was equally determined.  I re-read his article for clues.  Ultimately, I never had to try his solution of upgrading Perl modules, because this paragraph gave me all I needed:</p>
<blockquote><p>First off, my web hosting site didn&#8217;t appear to have db_upgrade, db_dump, db_dump185 or db_load installed. I hunted all over the directory tree and eventually found them in /usr/local/bin but they had the prefix db3_ instead of db_. Be aware your hosting company may have renamed these utilities. Remember&#8230; the locate and whereis commands are your friend.</p></blockquote>
<p>Db3?  Locate!  Five seconds later, I had found the &#8220;db3_upgrade&#8221; program that had eluded me while I was searching for its little brother without the 3.  Ran it, went to MT-Medic, waited with bated breath for it to load, and magic!  The database spilled its guts across my screen:  authors, blogs, everything.  Moving to the login window, the entire Movable Type installation was back at my fingertips, fully operational.</p>
<p>My next item of business?  Export!  You&#8217;ll soon be seeing some of the old blog entries nestled in new blog homes.  Hopefully no other Movable Type users have to go through what I went through, but if they do, I hope this note helps.  </p>
<p>Remember, back up your data often.</p>
<p>UPDATE:  I&#8217;m <a href="http://ask.metafilter.com/mefi/25356">not the only one</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://perpetualbeta.com/release/2005/11/database-resurrection/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.280 seconds -->

