I need to merge two Drupal installations with a shared users table. Can Migrate module help me in this task? Can it import nodes to main Drupal installation from the second one respecting nodes' associations with their respective comments? Can Migrate attribute new nids for the nodes to be imported from the second website as otherwise nids of two Drupal installations will conflict with each other?

Or http://drupal.org/project/node_import module is better way to go in my case?

CommentFileSizeAuthor
#4 Screen shot 2010-11-11 at 5.31.33 PM.png59.62 KByngens

Comments

yngens’s picture

Maybe I was supposed to post this within forums and not as an issue? If the module's maintainers think so, could you please transfer this to the forums?

mikeryan’s picture

Status: Active » Fixed

Can it import nodes to main Drupal installation from the second one respecting nodes' associations with their respective comments?

Yes. Migrate tracks mappings from source IDs to destination IDs (i.e., it maps a nid from the external site to the nid of the resulting node in the main site) - when the comments are imported, the nids associated with them (pointing at nodes to the external site) are looked up in this table so they will be associated with the new nids on the main site.

Can Migrate attribute new nids for the nodes to be imported from the second website as otherwise nids of two Drupal installations will conflict with each other?

Per above, when you migrate a node from an external site, the corresponding node created on the main site will have a new nid - there is no conflict with pre-existing content on the main site, but we do maintain the associations.

yngens’s picture

Sounds great and very much suitable to my situation. mikeryan, could you please also confirm if I am thinking right about that only the following tables from second database need to be migrated on top of main database:

blog_node
blog_node_revisions
blog_node_type
blog_comments
blog_comment_upload_files

The content of usertable are shared and exactly the same as of the main site.

Generally, what are must migrate tables in any situation if we are talking about merging two different Drupal installations?

Thank you very much!

P.S. Here is a list of the tables from my second database, from which I need to merge nodes and comments to the main database.

 blog_access
 blog_accesslog
 blog_acidfree_album
 blog_activity
 blog_activity_history
 blog_activity_targets
 blog_admin_message
 blog_admin_message_close
 blog_ads
 blog_ad_clicks
 blog_ad_hosts
 blog_ad_image
 blog_ad_image_format
 blog_ad_notify
 blog_ad_owners
 blog_ad_permissions
 blog_ad_statistics
 blog_ad_text
 blog_aggregator_category
 blog_aggregator_category_feed
 blog_aggregator_category_item
 blog_aggregator_feed
 blog_aggregator_item
 blog_audio
 blog_audio_attach
 blog_audio_image
 blog_audio_itunes_channel
 blog_audio_itunes_item
 blog_audio_metadata
 blog_authmap
 blog_blocks
 blog_blocks_roles
 blog_bloginfo
 blog_boxes
 blog_buddylist
 blog_buddylist_buddy_group
 blog_buddylist_groups
 blog_buddylist_pending_requests
 blog_bueditor_buttons
 blog_bueditor_editors
 blog_cache
 blog_cache_content
 blog_cache_filter
 blog_cache_menu
 blog_cache_page
 blog_cache_views
 blog_comments
 blog_comment_upload_files
 blog_community_tags
 blog_contact
 blog_contentblocker
 blog_content_field_attach_images
 blog_content_type_
 blog_content_type_acidfree
 blog_content_type_admin_message
 blog_content_type_audio
 blog_content_type_blog
 blog_content_type_faq
 blog_content_type_image
 blog_content_type_page
 blog_content_type_uprofile
 blog_content_type_usernode
 blog_devel_queries
 blog_devel_times
 blog_dob
 blog_dodge
 blog_dodge_options
 blog_faq_questions
 blog_faq_weights
 blog_files
 blog_file_revisions
 blog_filters
 blog_filter_formats
 blog_fivestar_comment
 blog_flood
 blog_form_store_forms
 blog_forum
 blog_fotonotes
 blog_guestbook
 blog_history
 blog_ignore_user
 blog_image
 blog_invite_notifications
 blog_ip2cc_node
 blog_iso3166
 blog_jsnippets
 blog_jsnippets_sections
 blog_locales_meta
 blog_locales_source
 blog_locales_target
 blog_mail_edit
 blog_masquerade
 blog_menu
 blog_node
 blog_nodefamily
 blog_node_access
 blog_node_comment_statistics
 blog_node_counter
 blog_node_field
 blog_node_field_instance
 blog_node_group
 blog_node_group_fields
 blog_node_revisions
 blog_node_type
 blog_panels_display
 blog_panels_mini
 blog_panels_object_cache
 blog_panels_page
 blog_panels_pane
 blog_panels_views
 blog_permission
 blog_pm_subscriptions_mail_edit
 blog_poll
 blog_poll_choices
 blog_poll_votes
 blog_private
 blog_profile_fields
 blog_profile_values
 blog_requestinvitation
 blog_role
 blog_search_dataset
 blog_search_index
 blog_search_total
 blog_sequences
 blog_sequences_old
 blog_sessions
 blog_slideshow
 blog_smileys
 blog_subscriptions
 blog_subscriptions_mail_edit
 blog_subscriptions_queue
 blog_subscriptions_user
 blog_system
 blog_taxonomy_manager_merge
 blog_term_data
 blog_term_hierarchy
 blog_term_node
 blog_term_relation
 blog_term_synonym
 blog_term_user
 blog_url_alias
 blog_usernode
 blog_users
 blog_users_roles
 blog_users_signature
 blog_user_activity
 blog_user_expertise
 blog_user_relationships
 blog_user_relationship_defaults
 blog_user_relationship_types
 blog_user_tags_vocabulary
 blog_user_visits
 blog_variable
 blog_view_argument
 blog_view_exposed_filter
 blog_view_filter
 blog_view_sort
 blog_view_tablefield
 blog_view_view
 blog_vocabulary
 blog_vocabulary_node_types
 blog_votingapi_cache
 blog_votingapi_vote
 blog_watchdog

It looks like this because I am trying to upgrade subdomain separately from main site from D5 to D6. Initially settings.php looked like this if it matters:

$db_prefix = array(
'default'   => 'blog_',
'users'     => '',
'sessions'  => '',
'sequences' => '',
'persistent_login' => '',
'persistent_login_history' => '',
'role'      => '',
'authmap'   => '',
'profile_fields' => '',
'profile_values' => '',
'users_roles' => '',
'locales_meta' => '',
'locales_source' => '',
'locales_target' => '',
'password_reset' => '',
'password_reset_users' => '',
'bueditor_buttons' => '',
'bueditor_editors' => '',
'buddylist' => '',
'buddylist_buddy_group' => '',
'buddylist_groups' => '',
'buddylist_pending_requests' => '',
'invite' => '',
'guestbook' => '',
'privatemsg' => '',
'privatemsg_archive' => '',
'privatemsg_block_user' => '',
'privatemsg_folder' => '',
'privatemsg_mails' => '',
);

yngens’s picture

Status: Fixed » Active
StatusFileSize
new59.62 KB

Trying to add a content set. On clicking Destination it gives some options like Comment, Node: Blog entry, Node: Image, Node: Page, Node: Story, User, Role, however I am going to migrate nodes of different types and would prefer them to maintain their respective node types. I do not want to attribute all of them to one type of nodes.

Maybe I misconfigured the setup, but can't figure out how to make such a content set, where it would be possible to select node as a Destination without specifying node type and so that nodes to be imported would be associated with their respective node types after import.

yngens’s picture

Version: 6.x-2.x-dev » 6.x-1.1

Because, there is no UI for 6.x-2.x, I decided to go with 6.x-1.1. So the issue in #4 I am encountering with Migrate 6.x-1.1

mikeryan’s picture

Status: Active » Fixed

A content set (in Migrate 1 lingo) or migration (in Migrate 2 lingo) represents migration of content from a set of source data to a specific Drupal entity type (such as a node type). To migrate into multiple content types, you need to defined multiple content sets/migrations, one for each content type, with your source view/query filtered appropriately.

yngens’s picture

I wonder is it allowed to post a link to Paid Drupal Services forum, to where I had to take the subject of this issue, without changing its status. Please, interested follow this link: http://drupal.org/node/972600

Status: Fixed » Closed (fixed)

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