Development Seed Blog

Migrate Your Aggregator From Leech to FeedAPI This Weekend

A Migration Script to Make the Transition Easy

A Migration Script to Make the Transition Easy

After a lot of hard work, we've released FeedAPI 1.0. But what does this mean for Leech users? Simply put, in most cases it means a better aggregation option is now available - and with the ready-to-use migration script explained below the transition is easy.

As most active users know, Leech isn't being further developed. On the other hand, FeedAPI is actively maintained and constantly improved. This alone means that in most cases, the obvious move is to migrate to FeedAPI. You probably don't want replace Leech if your site is running nicely, doesn't need new features, and has no performance problems. But if that isn’t the case, then migrating to FeedAPI is a good idea. If you're still in doubt, try FeedAPI out at feedapi.novaak.net. (Note: The site can be snail slow, but that's not because of FeedAPI - it's on shared hosting :) )

Follow these instructions to upgrade to FeedAPI from Leech:

Requirements: Leech 1.9 installed, MySQL, PHP4-5 (Note: The migration script does not work with PostgreSQL)

1) Download the migration script.

2) Go into maintenance mode offline (admin/settings/site-maintenance). Copy the leech2feedapi.php script to Drupal's main directory. This is the directory where Drupal's index.php can be found.

3) Save the full database dump of your site (from phpmyadmin or the command line if you have shell access: mysqldump database_name > db_backup.sql ) This step is really important. If you're not satisfied with the result of the migration, this will be your restore point. The migration script only alters the database, nothing else (which shouldn't be surprising for advanced Drupal users).

4) Make sure that you don't have feedapi_node and feedapi_aggregator named as content types. There's not a big chance that you do, but who knows? FeedAPI will create new content-types with these names. This is easier than in Leech where you had to manually struggle with content-types.

5) Install and enable the FeedAPI 1.0 module, the FeedAPI Node module, and one of the parsers (Parser SimplePie or Parser Common Syndication). You can grab the FeedAPI 1.0 package here. Please note that later versions won't be compatible with this script. You must first migrate 1.0 and then upgrade to newer versions. There is a description of how to install FeedAPI here.

6) If you still use PHP4 (which I don't recommend), you must install Parser SimplePie (and SimplePie package). Otherwise the upgrade will fail.

7) Run the migration php (leech2feedapi.php) from the command line (navigate to Drupal main directory to do so). If it's not possible, call it from the browser but set the php timeout option (max_execution_time) to as big a value as possible. The command line version is preferred if your site has a lot of feeds. The script's output will tell you about the process. Below you can see a possible and successful output of the migration script, which is invoked from command line.

8) Review how it worked! Poke around your site. Go to admin/content/feed and see if your feeds are there, run cron.php, and check for new items. WARNING: You may experience duplicate new items. This is annoying, but please remove the old (not the newly created) items and it won't happen again. This happens because of Leech and FeedAPI 's different guid handling.

9) If you're satisfied, have fun with FeedAPI and uninstall Leech! The fun just begins with the migration :)

10) Go to online mode. You're still off-line, show your visitors that FeedAPI is at least as good as Leech was :)

11) If you find a bug, report it here : )

Comments
nice tutorial

Very nice and easy to read. thanks.