2

I am working on an update of a site from Drupal 6 to 7. The site will have a complete redesign and - since the structure is somewhat chaotic - I don't want to migrate the complete data.

On the current site, articles are stored in 6 different content types which are different only by name, but have the same fields. I want to migrate them to the standard "article" type and only add a tag which will indicate which section they belong.

On the current site, images were uploaded to the server and then just linked from the teaser. I want them stored in an image field on the new site, and I need to modify the teaser too before inserting to the new site.

Can I do this on database level with a php script or should I do this in Drupal? In that case - how do I communicate between the old and the new version?

Or is there a module for this? What I need is:

  1. Move all articles (6 content types) to new site (about 500 articles), all in the article content type and set a tag based on the original 6 content types
  2. Catch images in teasers, make them drupal managed files and attach them to the correspondig node
  3. Delete the image tags from the teasers (they will be displayed from the image field)
  4. Retain paths and tags for the nodes as we have a lot of indexed pages

Is this possible or shuld I choose another path?

EDIT: Ok, I can insert nodes in the new system by code and add taxonomy terms as required, but I still trying to figure out how to add images and the way of communication between the two systems.

EDIT Thanks everyone for the ideas. I solved the problem by writing a custom module that communicated with the D6 install and pulled the nodes I needed.

0

2 Answers 2

2

In my experience the Migrate Module works really well for this.

In your migration you could use Preparerow() method to modify the fields you want to change before the import.

You can find more documentation on it here: Advanced Field Mapping Drupal Migration Documentation

Hope it helps :)

0

To put a fine point on Vic's answer, you'll find Migrate_D2D does most of the heavy lifting you'll need to migrate content where Drupal is both the source and target. Migrate is great for generic data migrations, such as from CSV, MySQL, and other non-Drupal native data sources. There is a migrate_d2d_ui submodule that may serve your purposes if you're uncomfortable with code. In my uses,however, I found coding the migration per Drupal object type well worth the time. Like Drush, the time you invest in learning migrate and migrate_d2d has big payoff.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.