Closed (fixed)
Project:
Migrate
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 May 2011 at 15:30 UTC
Updated:
15 Mar 2012 at 23:20 UTC
Jump to comment: Most recent file
Comments
Comment #1
mikeryanI think this use case is a little narrow to be packaged with Migrate itself. There are two efforts in this area I can speak to:
Note that both of these approaches involve services on the source side (q0rban had JSON services returning field metadata).
Comment #2
artatac commentedI am also struggling. I have a d6 site with article, cck image field, tags, title, and maybe book structure. Looking for guidance on pulling alll nodes straight into a fresh d7 install. I have looked at feeds and csv imports but all seem to strip out body text tags eg h2. Can you give any first steps guidance or point to any documentation. I have always bottled this in the past and spent a day manually copy and pasting between two browser windows!
Comment #3
drewish commentedMike, I find myself rebuilding what you were describing in your first example (but D6->D7 and we're moving some nodes into Webform submissions). I've started building out a custom service to expose CCK/profile fields for nodes and users, list nodes/users, and serialize node/user objects but am realizing there's some things that are hard to get right. I'm starting to appreciate the issues with exposing 54,000 user ids (results in 17mb of JSON if you don't paginate it) and I'm going to have to figure out how to implement the whole high water mark feature so we can keep importing users and nodes until we make the final cutover to the new site.
Is your code in any kind of a state to share? I'd love to avoid the duplication and help clean that up if it's an option.
Comment #4
mikeryanRather than a custom service, I used the services module on the D6 side, with the attached migrate_service module to configure the source side. On the destination side, I created an extension of the JSON source plugin (attached as drupal_source.inc), and in the term migration (which is as far as I got with this little proof-of-concept) set up the source thusly:
Hope this helps a bit.
Comment #5
moshe weitzman commentedI have not looked closely at it, but migrate_remote looks pretty on topic here - http://drupal.org/sandbox/fgm/1138504. If you try it, let us know what it does :)
Comment #6
drewish commentedI went the custom module route after looking at services and feeling like their index handlers were pretty brain dead with the hard coded 20 item page size. It seemed like a lot of overhead for what was pretty simple. I also added a callback to kick out the list of fields for each node type and users. Seems kind of similar to what migrate_remote is trying to do but we had a D6 site so I don't feel as bad about not using that.
Comment #7
mikeryanYes, the hardcoded page size was an annoyance I ran into. Thought I had put in a feature request but it seems not; however, the topic has been picked up and there is a patch in the queue: #1186738: add pagesize to services_resource_build_index_query
Comment #8
mikeryanAnother services-based approach: Content API.
Comment #9
mikeryanSee also #1234528: Include a module with classes to migrate content from Drupal 6 to Drupal 7. And, the core issue #1052692: New import API for major version upgrades (was migrate module) is also relevant - assuming we go ahead with that (D7->D8 core upgrade using Migrate API), I'll certainly try to make it general enough to easily be repurposed for D6->D8, and easily be backported in contrib for D?->D? migrations.
But, that's a long-term solution. In the short-term, I think the most general answer is to extend services to deliver what we want from the source side, and develop the Migrate classes I started on for the destination side. I do usually want to migrate directly from the source database if at all possible, but a services-based approach would be useful in cases where that isn't practical, and I don't really want to develop both SQL-based and XML-based migrations for this use case. Unlike external CMS cases, where you may be forced to use some lousy XML service that does more to obscure than illuminate the data, we actually have some influence on the source side.
Comment #10
naught101 commentedNot usre how relevant this is, but http://drupal.org/sandbox/frjo/1332996 has some d6 sources
Comment #11
mikeryanI actually have an approach of my own in the works, more general than frjo's, I'm hoping to be far enough along to make a sandbox in January.
Comment #12
naught101 commentedhttp://drupal.org/sandbox/mikeryan/1234554 this?
Comment #13
mikeryanYes, forgot I had reserved the sandbox a while ago. I've got a hot D6-to-D7 project on my plate now, hoping to fill in that sandbox within the next couple of weeks.
Comment #14
naught101 commentedrelated slightly: #1338648: Migrating directly from D5 to D7
Comment #15
mikeryanSee http://drupal.org/sandbox/mikeryan/1234554.
Comment #16
naught101 commented@Mike:
git push?Comment #17
mikeryanIt is there: http://drupalcode.org/sandbox/mikeryan/1234554.git/commit/1834114
Comment #18
naught101 commentedRight, sorry, was looking in the master branch. stupid me.