Hi, I'm interested in migrating from Drupal 5 to Drupal 7, and am wondering what they best way of going about this is. Moshe implies that this could be done at http://quicksketch.org/node/5739#comment-4792.

Does anyone have any example code for such a migration? There is an example at http://drupal.org/sandbox/meba/1089882, but the code hasn't been uploaded: #1096472: Push the code to git.d.o

CommentFileSizeAuthor
#6 migrate_d2d_d5.patch11.18 KBnaught101

Comments

naught101’s picture

Title: Migrating from D5 to D7 » Migrating directly from D5 to D7

ok, since I have a few sites like this, and since there are still probably 10k+ d5 sites in existence, I decided it'd be worth my while to take a crack at this.

I started with frjo's xdeb migration (5->6) http://drupal.org/sandbox/frjo/1332996 , and am attempting to generalise it, eg. so there's a generally applicable abstract node migration class that can be extended to specific content types. Finding it a bit of a struggle, so any help/advice/patches would be more than welcome.

dtabach’s picture

subscribing.

mikeryan’s picture

@dtabach - PLEASE do not add comments to subscribe - just click the Follow button to the right of the issue header.

@naught101 - I am actively working on a general-purpose Drupal-to-Drupal module, which I will commit to a sandbox within a couple of weeks (I'm still refactoring stuff on a nearly daily basis, don't want to inflict that on anyone else).

mikeryan’s picture

Status: Active » Fixed

First round of a general Drupal-to-Drupal migration module is at http://drupal.org/sandbox/mikeryan/1234554 - currently D6 is the only semi-supported source, but patches to support D5 are welcome there.

naught101’s picture

Project: Migrate » Drupal-to-Drupal data migration
Version: 7.x-2.x-dev »
Component: Miscellaneous » Code
Assigned: Unassigned » naught101
Category: support » feature
Status: Fixed » Active

Ok, thanks heaps for this Mike, and sorry for bugging you so much about it :)

I will start working on some general d5 patches as soon as I can find some time. Rejigging this issue to suit.

naught101’s picture

Status: Active » Needs work
StatusFileSize
new11.18 KB

Holy crap, in worked nearly first time! I just copied the d6 stuff to d5, and one minor DB change (vid doesn't exist in {term_node} in d5). I tried a basic import - no failures, although I was only testing really basic data with a modification of the migrate_d2d_example module (which is very nice, BTW). I will hopefully get my migration working, and will post further patches if I hit any stumbling blocks.

hackwater’s picture

Any luck getting D5 roles to migrate to D7? I can get users and their associated role IDs, but for some reason, I've got to manually export/import the roles table (the one mapping role ID to role name). At one point, we deleted a role for this particular site, so when the the roles migration tries to run, the fact that it seems to just auto-increment the role ID when it should instead be preserving the source role ID is hugely problematic, as this breaks the role name/role ID relationship.

It's possible I'm actually looking at a bug in the class I built to handle the MigrateDestinationRole object, but if anyone has been successful at migrating roles (names + ids) as well as users and user roles, I'd love to know how you did it. I've got a score of sites to upgrade from D5 to D7, and the D5->D6 upgrade failed, duplicating content and menus all over the place, so I'm very interested in getting a working D5 to D7 upgrade using Migrate.

naught101’s picture

Status: Needs work » Reviewed & tested by the community

I actually think this is a good enough start. It has all the features of the d6 version, and they seem to work. since this is a pre-alpha module, I think it'd be better to get this in quick, and then add stuff as we go (most stuff will be close to the d6 sources anyway).

@hackwater: I was just goint to manually re-create roles, since permissions have changed anyway. Please open a separeate issue for roles. if we can get a patch for the d6 sources, then it'll be relatively painless to port that to d5.

mikeryan’s picture

Yes, with a sandbox it's fine to get somewhat experimental code in... Committed (with .info changes added), thanks!

mikeryan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

naught101’s picture

By the way, I started a d5->d7 migration implementation ages ago: https://drupal.org/sandbox/naught101/1417496. Unfortunately, I didn't get very far before I had to get back into Uni in a big way, so it's far from complete. It's there for the forking though, if anyone wants it.

bah, sorry, that's not the right project. The project I have is not correctly anonymous, but I will make it so soon, and push it.

cmejo’s picture

Status: Closed (fixed) » Active

Hey naught101, any progress on releasing the module you wrote? I am stuck on importing forums from d5 to d7... any help would be appreciated! I tried views_bonus_pack but I couldn't seem to find the CSV file... it wouldn't appear/download.

mikeryan’s picture

Status: Active » Closed (fixed)

Please don't reopen closed issues.

naught101's original implementation for D5 migration is part of migrate_d2d - any specific bug reports or feature requests for the D5 support should have their own issues.

naught101’s picture

https://drupal.org/sandbox/naught101/1655440 <- This is what I meant. It's most certainly not working right now. I don't have a heap of time to work on it, nor much inspiration, so I wouldn't expect it to develop fast, but I will be trying to put a bit of effort into it on a weekly basis from now on. Patches are more than welcome.

Mike, I know you're really busy, but at some point in the future if you get time, I'd love a bit of a review. I think it's possible that some of the stuff I want to do in this module should actually go into migrate_d2d or migrate_extras, but I'm not sure which bits. I'll let you know when it's a bit less of a shambles...