SOLVED: copy users from CB 1.01 to 1.02

16 years 9 months ago #39241 by asgeir
I have 2 servers, one with CB 1.01 and the other with CB 1.02
Now I want to copy the users from CB 1.01 server to the new CB 1.02 server and keep all data/passwords etc for the users..

This is how I solved it - can some expert please verify that it is correct? :) (note: I did not include friends (jos_comprofiler_members), userreports & plugin-data in the transfer...
1.NEW SITE: BACKUP DATABASE
2.NEW SITE: Delete tables:
jos_users
jos_core_acl_aro
jos_core_acl_groups_aro_map
jos_comprofiler
jos_comprofiler_fields
jos_comprofiler_field_values
jos_comprofiler_lists
jos_comprofiler_views
jos_comprofiler_tabs
3. OLD SITE: Syncronize CB & Joomla from CB admin tools
4. OLD SITE: EXPORT TABLES (AS SQL):
jos_users
jos_core_acl_aro
jos_core_acl_groups_aro_map
jos_comprofiler
jos_comprofiler_fields
jos_comprofiler_field_values
jos_comprofiler_lists
jos_comprofiler_views
jos_comprofiler_tabs

5. NEW SITE: IMPORT TABLES (same as above)
6. do following SQL queries in your SQL admin (because we imported 1.01 tables into the 1.02 installation)
UPDATE jos_comprofiler_fields SET `table`='#__users' WHERE name='email';
UPDATE jos_comprofiler_fields SET `table`='#__users' WHERE name='lastvisitDate';
UPDATE jos_comprofiler_fields SET `table`='#__users' WHERE name='registerDate';
ALTER TABLE jos_comprofiler ADD `registeripaddr` VARCHAR( 50 ) DEFAULT '' NOT NULL AFTER `lastupdatedate`;
ALTER TABLE jos_comprofiler ADD `cbactivation` VARCHAR( 50 ) DEFAULT '' NOT NULL AFTER `registeripaddr`;
ALTER TABLE jos_comprofiler ADD message_last_sent DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `hits`;
ALTER TABLE jos_comprofiler ADD message_number_sent INT( 11 ) DEFAULT 0 NOT NULL AFTER message_last_sent;
ALTER TABLE jos_comprofiler_field_values ADD INDEX fieldid_ordering (`fieldid`, `ordering` );
ALTER TABLE jos_comprofiler_fields ADD INDEX `tabid_pub_prof_order` ( `tabid` , `published` , `profile` , `ordering` );
ALTER TABLE jos_comprofiler_fields ADD INDEX `readonly_published_tabid` ( `readonly` , `published` , `tabid` );
ALTER TABLE jos_comprofiler_fields ADD INDEX `registration_published_order` ( `registration` , `published` , `ordering` );
ALTER TABLE jos_comprofiler_tabs ADD INDEX `enabled_position_ordering` ( `enabled` , `position` , `ordering` );
ALTER TABLE jos_comprofiler_lists ADD INDEX `pub_ordering` ( `published` , `ordering` );
ALTER TABLE jos_comprofiler_lists ADD INDEX `default_published` ( `default` , `published` );
ALTER TABLE jos_comprofiler_views ADD INDEX `lastview` ( `lastview` );
ALTER TABLE jos_comprofiler_views ADD INDEX `profile_id_lastview` (`profile_id`,`lastview`);
UPDATE jos_comprofiler SET `user_id`=`id` WHERE 1>0;
ALTER TABLE jos_comprofiler ADD UNIQUE KEY user_id (`user_id`);
ALTER TABLE jos_comprofiler ADD INDEX `apprconfbanid` ( `approved` , `confirmed` , `banned` , `id` );
ALTER TABLE jos_comprofiler ADD INDEX `avatappr_apr_conf_ban_avatar` ( `avatarapproved` , `approved` , `confirmed` , `banned` , `avatar` );
ALTER TABLE jos_comprofiler ADD INDEX `lastupdatedate` ( `lastupdatedate` );


7. DONE

Post edited by: asgeir, at: 2007/06/10 12:11

Post edited by: asgeir, at: 2007/06/10 12:32

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.162 seconds

Facebook Twitter LinkedIn