<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://labs.echoditto.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>EchoDitto Labs - Drupal Data Importing as a Thrill-seeking Behavior - Comments</title>
 <link>http://labs.echoditto.com/drupal-data-importing</link>
 <description>Comments for &quot;Drupal Data Importing as a Thrill-seeking Behavior&quot;</description>
 <language>en</language>
<item>
 <title>Of course we do backups!  We</title>
 <link>http://labs.echoditto.com/drupal-data-importing#comment-3916</link>
 <description>&lt;p&gt;Of course we do backups!  We do nightly backups to an offsite location and realtime intra-NOC replication to a hot spare.  Nothing against the Backup and Migrate module, but we&#039;ve got a genuine enterprise system for backing up our databases and filesystem.&lt;/p&gt;
&lt;p&gt;But it&#039;s not worth digging into that system just to restore a single comment on a non-client site (no offense to Tim) -- especially when we can remember the gist of it.&lt;/p&gt;
</description>
 <pubDate>Wed, 26 Mar 2008 07:54:10 -0700</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">comment 3916 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>You guys don&#039;t do backups?</title>
 <link>http://labs.echoditto.com/drupal-data-importing#comment-3914</link>
 <description>&lt;p&gt;You guys don&#039;t do backups? For small- to medium-ish sized sites I recommend the &lt;a href=&quot;http://drupal.org/project/backup_migrate&quot;&gt;Backup and Migrate&lt;/a&gt; module.&lt;/p&gt;
</description>
 <pubDate>Wed, 26 Mar 2008 00:44:52 -0700</pubDate>
 <dc:creator>Anonymous</dc:creator>
 <guid isPermaLink="false">comment 3914 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Hmm.  Well, it&#039;s a mystery.</title>
 <link>http://labs.echoditto.com/drupal-data-importing#comment-3896</link>
 <description>&lt;p&gt;Hmm.  Well, it&#039;s a mystery.  I can&#039;t imagine accidentally deleting it given the number of clicks required, and it&#039;s not in the spam folder.&lt;/p&gt;
&lt;p&gt;Well, uh... hmm.  Let&#039;s try to recreate it: there&#039;s a &lt;a href=&quot;http://drupal.org/project/import_typepad&quot;&gt;movable type importing plugin&lt;/a&gt;!  Although that link is 4.x only, so maybe I&#039;ve got the wrong one.&lt;/p&gt;
</description>
 <pubDate>Thu, 06 Mar 2008 14:22:18 -0800</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">comment 3896 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>yeah!! where did my great</title>
 <link>http://labs.echoditto.com/drupal-data-importing#comment-3895</link>
 <description>&lt;p&gt;yeah!! where did my great comment go?&lt;/p&gt;
</description>
 <pubDate>Thu, 06 Mar 2008 13:20:25 -0800</pubDate>
 <dc:creator>Tones</dc:creator>
 <guid isPermaLink="false">comment 3895 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Weird! There was a great</title>
 <link>http://labs.echoditto.com/drupal-data-importing#comment-3894</link>
 <description>&lt;p&gt;Weird! There was a great comment here from Tim but now it&#039;s mysteriously gone.  Anybody know what happened to it?&lt;/p&gt;
</description>
 <pubDate>Thu, 06 Mar 2008 12:43:41 -0800</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">comment 3894 at http://labs.echoditto.com</guid>
</item>
<item>
 <title>Drupal Data Importing as a Thrill-seeking Behavior</title>
 <link>http://labs.echoditto.com/drupal-data-importing</link>
 <description>&lt;p&gt;Yesterday Ethan, Chris and I found ourselves needing to move some data into Drupal &amp;mdash; we&#039;re building an existing client a new site and they need some blog posts moved over from their old one.  It sure &lt;em&gt;sounds&lt;/em&gt; simple.  But as anyone who&#039;s actually done data migration from one blogging platform to another (or just from one version to another) can attest, it&#039;s rarely that easy.  There are a few options, though, which I present here in increasing order of their likelihood to unexpectedly spiral into a huge, awful mess:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;Interns/Temps&lt;/dt&gt;
&lt;dd&gt;You&#039;d be surprised how often this is the most efficient data migration technology available to a project.  How many nodes are we talking about, anyway?  Aren&#039;t they going to require a manual review after any sort of automated migration, anyway?  How sure are you that you&#039;re not going to run into weird unicode problems?&lt;br /&gt;
You should really take a good long look at the problem and figure out the hours involved.  Frequently the cheapest and easiest option will be hiring a less skilled worker to manually move the data around.  It&#039;s not glamorous, but it&#039;s the truth.  Just be sure they don&#039;t have MS Word installed on their computers or else they&#039;ll inevitably copy and paste high ASCII garbage into your lovely new database.&lt;/dd&gt;
&lt;dt&gt;&lt;a href=&quot;http://drupal.org/project/node_import&quot;&gt;node_import&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;This is the only other userspace method of moving Drupal content around that I know of &amp;mdash; you export a CSV, upload it to your new server, do some field mapping and hopefully get a bunch of new nodes.  I gave it a look a few projects ago and came away frustrated, but Ethan&#039;s reported recent success.  It handles CCK types, taxonomy, event and location support, and generally seems to be the best hope for Drupal having really robust import/export functionality in the future.  But as far as I know it can&#039;t handle comments or attachments, and probably chokes on a number of other module integration points.  Import is a hard problem, and it&#039;s no knock on the module&#039;s authors to say that their work can&#039;t be all things to all people.  But sometimes you&#039;re going to need more.&lt;/dd&gt;
&lt;dt&gt;&lt;a href=&quot;http://api.drupal.org/api/function/drupal_execute/5&quot;&gt;drupal_execute()&lt;/a&gt;&lt;/dt&gt;
&lt;dd&gt;The drupal_execute() function lets you summon a Drupal form, populate its values and then submit it with all of Drupal&#039;s hooks firing just as they would for manually-entered content. Chris is our drupal_execute() guru, and he&#039;s pretty well convinced me that it&#039;s the premiere tool for difficult data importing problems.  Sure, you might be irritated by the occasional HTTP timeout if you forget your ini_set()&#039;s, and writing your first Drupal-bootstrapping wrapper might seem a little weird &amp;mdash; although Drupal 6&#039;s command line mode should make this all &lt;em&gt;much&lt;/em&gt; less painful &amp;mdash; but in general it&#039;s an awfully powerful technique.  Jeff Eaton has a &lt;a href=&quot;http://www.lullabot.com/articles/quick_and_dirty_cck_imports&quot;&gt;nice example&lt;/a&gt; of it over at Lullabot&#039;s blog.&lt;/dd&gt;
&lt;dt&gt;SQL!&lt;/dt&gt;
&lt;dd&gt;But there are times when you just can&#039;t be bothered.  You&#039;ve got the old database; you&#039;ve got the new one.  Why are you being forced to screw around with an intermediary layer of abstraction?&lt;/p&gt;
&lt;p&gt;Well, there are a few reasons.  First, there&#039;s the sequences table &amp;mdash; Ethan pointed out to me that it&#039;s disappearing in Drupal 6, but for earlier versions you&#039;ll need to update it after any direct SQL butchery. Second, there&#039;s the endless (and yet inconsistent!) JOINs of post-CCK Drupal &amp;mdash; teasing out where all that data is supposed to go can take longer than jumping through Drupal&#039;s API hoops.  Having taken this route with our Greenpeace UK project, writing a rat&#039;s next of Coldfusion-to-Drupal scripts in Perl, I can say with confidence that if your eyes immediately gravitated to this section of the post, you should probably go give drupal_execute() a closer look. Seriously.&lt;/p&gt;
&lt;p&gt;But sometimes the temptation is impossible to resist.  Need to move over a bunch of legacy path aliases?  Have a big batch of comments that need to get into the system (and no fear of the node_comment_statistics table)?  Then you may as well make sure you&#039;re good &amp;amp; backed up, clear some time afterward to look for odd bugs, and dive in.  Sometimes it&#039;s worth doing just to remind yourself that you know web technologies beyond the scope of api.drupal.org.&lt;/dd&gt;
&lt;/dl&gt;
&lt;p&gt;Those are the options we considered, anyway.  Am I missing anything?  Have you done something unusual, like doing a large-scale import via &lt;a href=&quot;http://drupal.org/project/feedapi&quot;&gt;Development Seed&#039;s FeedAPI&lt;/a&gt;?  Let us know in comments.&lt;/p&gt;
</description>
 <comments>http://labs.echoditto.com/drupal-data-importing#comments</comments>
 <category domain="http://labs.echoditto.com/taxonomy/term/161">csv</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/158">data</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/46">drupal</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/162">drupal_execute</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/160">importing</category>
 <category domain="http://labs.echoditto.com/taxonomy/term/159">migration</category>
 <pubDate>Wed, 20 Feb 2008 09:24:36 -0800</pubDate>
 <dc:creator>Tom</dc:creator>
 <guid isPermaLink="false">65 at http://labs.echoditto.com</guid>
</item>
</channel>
</rss>
