SMF Support > Install and Upgrade Help

port from 1.1.11 to 2.0.2

<< < (2/4) > >>

flashsteam:
Here's what he is saying to me:


--- Quote ---Also - Can you post in SMF Support (simplemachines.org) regarding the attachments and members missing and then link me to the topic? I've done a lot of digging, and can't figure it out. I'd like to see what others thoughts are.

As I said, I've done a ton of research, and could not find a cause of the issue, so I said post in the SMF Support Boards, and link me to the topic, and I'd make sure it got resolved.

I just need to hear some Support Specialists opinion on what the issue is as I've run in circles trying to find an issue.

The members are DEFINITELY there, they're just not being connected, and I can't figure out why. Same thing with attachments, the files and database entries are all present.

--- End quote ---

The issue is the current board member count is at about 1300, when i go in and look at the members in the acp, thats all the members I can see 1300 there should be 5300 there

Labradoodle-360:
Here's the deal...in the database all of the members are there, I know that without a doubt. Same thing with attachments, but the forum is only showing about a thousand of them, this means about 4 thousand are "gone" from the forum.

Looking:
I did not get an answer on the backup.

I sent a PM on this issue, I will need to have a look to see what is going on.

flashsteam:
At this point, the problem with the member count has been corrected.

Im going to leave this topic open, because this problem gave us all sorts of trouble, any additional dialog is welcome.

Thanks

Jeremy

Forumtastic:
This is what I used since the upgrade would not work and gave undefined error.

I created views that mapped out the old and new fields. Make sure you approve/reject all pending members first.


--- Code: ---SET FOREIGN_KEY_CHECKS=0;
DROP VIEW IF EXISTS `upgrade_smf_attachments`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_attachments` AS select `smf_attachments`.`ID_ATTACH` AS `id_attach`,`smf_attachments`.`ID_THUMB` AS `id_thumb`,`smf_attachments`.`ID_MSG` AS `id_msg`,`smf_attachments`.`ID_MEMBER` AS `id_member`,1 AS `id_folder`,`smf_attachments`.`attachmentType` AS `attachment_type`,`smf_attachments`.`filename` AS `filename`,`smf_attachments`.`file_hash` AS `file_hash`,'' AS `fileext`,`smf_attachments`.`size` AS `size`,`smf_attachments`.`downloads` AS `downloads`,`smf_attachments`.`width` AS `width`,`smf_attachments`.`height` AS `height`,1 AS `approved` from `smf_attachments`;
DROP VIEW IF EXISTS `upgrade_smf_ban_groups`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_ban_groups` AS select `smf_ban_groups`.`ID_BAN_GROUP` AS `id_ban_group`,`smf_ban_groups`.`name` AS `name`,`smf_ban_groups`.`ban_time` AS `ban_time`,`smf_ban_groups`.`expire_time` AS `expire_time`,`smf_ban_groups`.`cannot_access` AS `cannot_access`,`smf_ban_groups`.`cannot_register` AS `cannot_register`,`smf_ban_groups`.`cannot_post` AS `cannot_post`,`smf_ban_groups`.`cannot_login` AS `cannot_login`,`smf_ban_groups`.`reason` AS `reason`,`smf_ban_groups`.`notes` AS `notes` from `smf_ban_groups`;
DROP VIEW IF EXISTS `upgrade_smf_ban_items`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_ban_items` AS select `smf_ban_items`.`ID_BAN` AS `id_ban`,`smf_ban_items`.`ID_BAN_GROUP` AS `id_ban_group`,`smf_ban_items`.`ip_low1` AS `ip_low1`,`smf_ban_items`.`ip_high1` AS `ip_high1`,`smf_ban_items`.`ip_low2` AS `ip_low2`,`smf_ban_items`.`ip_high2` AS `ip_high2`,`smf_ban_items`.`ip_low3` AS `ip_low3`,`smf_ban_items`.`ip_high3` AS `ip_high3`,`smf_ban_items`.`ip_low4` AS `ip_low4`,`smf_ban_items`.`ip_high4` AS `ip_high4`,`smf_ban_items`.`hostname` AS `hostname`,`smf_ban_items`.`email_address` AS `email_address`,`smf_ban_items`.`ID_MEMBER` AS `id_member`,`smf_ban_items`.`hits` AS `hits` from `smf_ban_items`;
DROP VIEW IF EXISTS `upgrade_smf_boards`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_boards` AS select `smf_boards`.`ID_BOARD` AS `id_board`,`smf_boards`.`ID_CAT` AS `id_cat`,`smf_boards`.`childLevel` AS `child_level`,`smf_boards`.`ID_PARENT` AS `id_parent`,`smf_boards`.`boardOrder` AS `board_order`,`smf_boards`.`ID_LAST_MSG` AS `id_last_msg`,`smf_boards`.`ID_MSG_UPDATED` AS `id_msg_updated`,`smf_boards`.`memberGroups` AS `member_groups`,1 AS `id_profile`,`smf_boards`.`name` AS `name`,`smf_boards`.`description` AS `description`,`smf_boards`.`numTopics` AS `num_topics`,`smf_boards`.`numPosts` AS `num_posts`,`smf_boards`.`countPosts` AS `count_posts`,`smf_boards`.`ID_THEME` AS `id_theme`,`smf_boards`.`override_theme` AS `override_theme`,0 AS `unapproved_posts`,0 AS `unapproved_topics`,'' AS `redirect` from `smf_boards`;
DROP VIEW IF EXISTS `upgrade_smf_categories`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_categories` AS select `smf_categories`.`ID_CAT` AS `id_cat`,`smf_categories`.`catOrder` AS `cat_order`,`smf_categories`.`name` AS `name`,`smf_categories`.`canCollapse` AS `can_collapse` from `smf_categories`;
DROP VIEW IF EXISTS `upgrade_smf_collapsed_categories`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_collapsed_categories` AS select `smf_collapsed_categories`.`ID_CAT` AS `id_cat`,`smf_collapsed_categories`.`ID_MEMBER` AS `id_member` from `smf_collapsed_categories`;
DROP VIEW IF EXISTS `upgrade_smf_membergroups`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_membergroups` AS select `smf_membergroups`.`ID_GROUP` AS `id_group`,`smf_membergroups`.`groupName` AS `group_name`,`smf_membergroups`.`groupName` AS `description`,`smf_membergroups`.`onlineColor` AS `online_color`,`smf_membergroups`.`minPosts` AS `min_posts`,`smf_membergroups`.`maxMessages` AS `max_messages`,`smf_membergroups`.`stars` AS `stars`,0 AS `group_type`,0 AS `hidden`,'-2' AS `id_parent` from `smf_membergroups`;
DROP VIEW IF EXISTS `upgrade_smf_members`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_members` AS select `smf_members`.`ID_MEMBER` AS `id_member`,`smf_members`.`memberName` AS `member_name`,`smf_members`.`dateRegistered` AS `date_registered`,`smf_members`.`posts` AS `posts`,`smf_members`.`ID_GROUP` AS `id_group`,`smf_members`.`lngfile` AS `lngfile`,`smf_members`.`lastLogin` AS `last_login`,`smf_members`.`realName` AS `real_name`,`smf_members`.`instantMessages` AS `instant_messages`,`smf_members`.`unreadMessages` AS `unread_messages`,0 AS `new_pm`,`smf_members`.`buddy_list` AS `buddy_list`,`smf_members`.`pm_ignore_list` AS `pm_ignore_list`,0 AS `pm_prefs`,'' AS `mod_prefs`,`smf_members`.`messageLabels` AS `message_labels`,`smf_members`.`passwd` AS `passwd`,'' AS `openid_uri`,`smf_members`.`emailAddress` AS `email_address`,`smf_members`.`personalText` AS `personal_text`,`smf_members`.`gender` AS `gender`,`smf_members`.`birthdate` AS `birthdate`,`smf_members`.`websiteTitle` AS `website_title`,`smf_members`.`websiteUrl` AS `website_url`,`smf_members`.`location` AS `location`,`smf_members`.`icq` AS `icq`,`smf_members`.`AIM` AS `aim`,`smf_members`.`YIM` AS `yim`,`smf_members`.`msn` AS `msn`,`smf_members`.`hideEmail` AS `hide_email`,`smf_members`.`showOnline` AS `show_online`,`smf_members`.`timeFormat` AS `time_format`,`smf_members`.`signature` AS `signature`,`smf_members`.`timeOffset` AS `time_offset`,`smf_members`.`avatar` AS `avatar`,`smf_members`.`pm_email_notify` AS `pm_email_notify`,`smf_members`.`karmaBad` AS `karma_bad`,`smf_members`.`karmaGood` AS `karma_good`,`smf_members`.`usertitle` AS `usertitle`,`smf_members`.`notifyAnnouncements` AS `notify_announcements`,`smf_members`.`notifyOnce` AS `notify_regularity`,`smf_members`.`notifySendBody` AS `notify_send_body`,`smf_members`.`notifyTypes` AS `notify_types`,`smf_members`.`memberIP` AS `member_ip`,`smf_members`.`memberIP2` AS `member_ip2`,`smf_members`.`secretQuestion` AS `secret_question`,`smf_members`.`secretAnswer` AS `secret_answer`,`smf_members`.`ID_THEME` AS `id_theme`,`smf_members`.`is_activated` AS `is_activated`,`smf_members`.`validation_code` AS `validation_code`,`smf_members`.`ID_MSG_LAST_VISIT` AS `id_msg_last_visit`,`smf_members`.`additionalGroups` AS `additional_groups`,`smf_members`.`smileySet` AS `smiley_set`,`smf_members`.`ID_POST_GROUP` AS `id_post_group`,`smf_members`.`totalTimeLoggedIn` AS `total_time_logged_in`,`smf_members`.`passwordSalt` AS `password_salt`,'' AS `ignore_boards`,0 AS `warning`,'' AS `passwd_flood`,1 AS `pm_receive_from` from `smf_members`;
DROP VIEW IF EXISTS `upgrade_smf_messages`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_messages` AS select `smf_messages`.`ID_MSG` AS `id_msg`,`smf_messages`.`ID_TOPIC` AS `id_topic`,`smf_messages`.`ID_BOARD` AS `id_board`,`smf_messages`.`posterTime` AS `poster_time`,`smf_messages`.`ID_MEMBER` AS `id_member`,`smf_messages`.`ID_MSG_MODIFIED` AS `id_msg_modified`,`smf_messages`.`subject` AS `subject`,`smf_messages`.`posterName` AS `poster_name`,`smf_messages`.`posterEmail` AS `poster_email`,`smf_messages`.`posterIP` AS `poster_ip`,`smf_messages`.`smileysEnabled` AS `smileys_enabled`,`smf_messages`.`modifiedTime` AS `modified_time`,`smf_messages`.`modifiedName` AS `modified_name`,`smf_messages`.`body` AS `body`,`smf_messages`.`icon` AS `icon`,1 AS `approved` from `smf_messages`;
DROP VIEW IF EXISTS `upgrade_smf_message_icons`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_message_icons` AS select `smf_message_icons`.`ID_ICON` AS `id_icon`,`smf_message_icons`.`title` AS `title`,`smf_message_icons`.`filename` AS `filename`,`smf_message_icons`.`ID_BOARD` AS `id_board`,`smf_message_icons`.`iconOrder` AS `icon_order` from `smf_message_icons`;
DROP VIEW IF EXISTS `upgrade_smf_moderators`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_moderators` AS select `smf_moderators`.`ID_BOARD` AS `id_board`,`smf_moderators`.`ID_MEMBER` AS `id_member` from `smf_moderators`;
DROP VIEW IF EXISTS `upgrade_smf_permissions`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_permissions` AS select `smf_permissions`.`ID_GROUP` AS `id_group`,`smf_permissions`.`permission` AS `permission`,`smf_permissions`.`addDeny` AS `add_deny` from `smf_permissions`;
DROP VIEW IF EXISTS `upgrade_smf_personal_messages`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_personal_messages` AS select `smf_personal_messages`.`ID_PM` AS `id_pm`,0 AS `id_pm_head`,`smf_personal_messages`.`ID_MEMBER_FROM` AS `id_member_from`,`smf_personal_messages`.`deletedBySender` AS `deleted_by_sender`,`smf_personal_messages`.`fromName` AS `from_name`,`smf_personal_messages`.`msgtime` AS `msgtime`,`smf_personal_messages`.`subject` AS `subject`,`smf_personal_messages`.`body` AS `body` from `smf_personal_messages`;
DROP VIEW IF EXISTS `upgrade_smf_pm_recipients`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_pm_recipients` AS select `smf_pm_recipients`.`ID_PM` AS `id_pm`,`smf_pm_recipients`.`ID_MEMBER` AS `id_member`,`smf_pm_recipients`.`labels` AS `labels`,`smf_pm_recipients`.`bcc` AS `bcc`,`smf_pm_recipients`.`is_read` AS `is_read`,0 AS `is_new`,`smf_pm_recipients`.`deleted` AS `deleted` from `smf_pm_recipients`;
DROP VIEW IF EXISTS `upgrade_smf_polls`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_polls` AS select `smf_polls`.`ID_POLL` AS `id_poll`,`smf_polls`.`question` AS `question`,`smf_polls`.`votingLocked` AS `voting_locked`,`smf_polls`.`maxVotes` AS `max_votes`,`smf_polls`.`expireTime` AS `expire_time`,`smf_polls`.`hideResults` AS `hide_results`,`smf_polls`.`changeVote` AS `change_vote`,0 AS `guest_vote`,0 AS `num_guest_voters`,0 AS `reset_poll`,`smf_polls`.`ID_MEMBER` AS `id_member`,`smf_polls`.`posterName` AS `poster_name` from `smf_polls`;
DROP VIEW IF EXISTS `upgrade_smf_poll_choices`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_poll_choices` AS select `smf_poll_choices`.`ID_POLL` AS `id_poll`,`smf_poll_choices`.`ID_CHOICE` AS `id_choice`,`smf_poll_choices`.`label` AS `label`,`smf_poll_choices`.`votes` AS `votes` from `smf_poll_choices`;
DROP VIEW IF EXISTS `upgrade_smf_sessions`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_sessions` AS select `smf_sessions`.`session_id` AS `session_id`,`smf_sessions`.`last_update` AS `last_update`,`smf_sessions`.`data` AS `data` from `smf_sessions`;
DROP VIEW IF EXISTS `upgrade_smf_settings`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_settings` AS select `smf_settings`.`variable` AS `variable`,`smf_settings`.`value` AS `value` from `smf_settings`;
DROP VIEW IF EXISTS `upgrade_smf_smileys`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_smileys` AS select `smf_smileys`.`ID_SMILEY` AS `id_smiley`,`smf_smileys`.`code` AS `code`,`smf_smileys`.`filename` AS `filename`,`smf_smileys`.`description` AS `description`,`smf_smileys`.`smileyRow` AS `smiley_row`,`smf_smileys`.`smileyOrder` AS `smiley_order`,`smf_smileys`.`hidden` AS `hidden` from `smf_smileys`;
DROP VIEW IF EXISTS `upgrade_smf_topics`;
CREATE ALGORITHM=UNDEFINED VIEW `upgrade_smf_topics` AS select `smf_topics`.`ID_TOPIC` AS `id_topic`,`smf_topics`.`isSticky` AS `is_sticky`,`smf_topics`.`ID_BOARD` AS `id_board`,`smf_topics`.`ID_FIRST_MSG` AS `id_first_msg`,`smf_topics`.`ID_LAST_MSG` AS `id_last_msg`,`smf_topics`.`ID_MEMBER_STARTED` AS `id_member_started`,`smf_topics`.`ID_MEMBER_UPDATED` AS `id_member_updated`,`smf_topics`.`ID_POLL` AS `id_poll`,0 AS `id_previous_board`,0 AS `id_previous_topic`,`smf_topics`.`numReplies` AS `num_replies`,`smf_topics`.`numViews` AS `num_views`,`smf_topics`.`locked` AS `locked`,0 AS `unapproved_posts`,1 AS `approved` from `smf_topics`;
--- End code ---

Then I set up the new forum from scratch. I used a shell script I wrote to export the view data from the original database:


--- Code: ---echo Processing attachments
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_attach, id_thumb, id_msg, id_member, id_folder, attachment_type, filename, file_hash, fileext, size, downloads, width, height, approved FROM upgrade_smf_attachments INTO OUTFILE '/temp/temp_smf_attachments.txt'"
# =============================================================================
echo Processing ban_groups
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_ban_group, name, ban_time, expire_time, cannot_access, cannot_register, cannot_post, cannot_login, reason, notes FROM upgrade_smf_ban_groups INTO OUTFILE '/temp/temp_smf_ban_groups.txt'"
# =============================================================================
echo Processing ban_items
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_ban, id_ban_group, ip_low1, ip_high1, ip_low2, ip_high2, ip_low3, ip_high3, ip_low4, ip_high4, hostname, email_address, id_member, hits FROM upgrade_smf_ban_items INTO OUTFILE '/temp/temp_smf_ban_items.txt'"
# =============================================================================
echo Processing boards
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_board, id_cat, child_level, id_parent, board_order, id_last_msg, id_msg_updated, member_groups, id_profile, name, description, num_topics, num_posts, count_posts, id_theme, override_theme, unapproved_posts, unapproved_topics, redirect FROM upgrade_smf_boards INTO OUTFILE '/temp/temp_smf_boards.txt'"
# =============================================================================
echo Processing categories
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_cat, cat_order, name, can_collapse FROM upgrade_smf_categories INTO OUTFILE '/temp/temp_smf_categories.txt'"
# =============================================================================
echo Processing collapsed_categories
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_cat, id_member FROM upgrade_smf_collapsed_categories INTO OUTFILE '/temp/temp_smf_collapsed_categories.txt'"
# =============================================================================
echo Processing membergroups
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_group, group_name, description, online_color, min_posts, max_messages, stars, group_type, hidden, id_parent FROM upgrade_smf_membergroups INTO OUTFILE '/temp/temp_smf_membergroups.txt'"
# =============================================================================
echo Processing members
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_member, member_name, date_registered, posts, id_group, lngfile, last_login, real_name, instant_messages, unread_messages, new_pm, buddy_list, pm_ignore_list, pm_prefs, mod_prefs, message_labels, passwd, openid_uri, email_address, personal_text, gender, birthdate, website_title, website_url, location, icq, aim, yim, msn, hide_email, show_online, time_format, signature, time_offset, avatar, pm_email_notify, karma_bad, karma_good, usertitle, notify_announcements, notify_regularity, notify_send_body, notify_types, member_ip, member_ip2, secret_question, secret_answer, id_theme, is_activated, validation_code, id_msg_last_visit, additional_groups, smiley_set, id_post_group, total_time_logged_in, password_salt, ignore_boards, warning, passwd_flood, pm_receive_from FROM upgrade_smf_members INTO OUTFILE '/temp/temp_smf_members.txt'"
# =============================================================================
echo Processing messages
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_msg, id_topic, id_board, poster_time, id_member, id_msg_modified, subject, poster_name, poster_email, poster_ip, smileys_enabled, modified_time, modified_name, body, icon, approved FROM upgrade_smf_messages INTO OUTFILE '/temp/temp_smf_messages.txt'"
# =============================================================================
echo Processing message_icons
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_icon, title, filename, id_board, icon_order FROM upgrade_smf_message_icons INTO OUTFILE '/temp/temp_smf_message_icons.txt'"
# =============================================================================
echo Processing moderators
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_board, id_member FROM upgrade_smf_moderators INTO OUTFILE '/temp/temp_smf_moderators.txt'"
# =============================================================================
echo Processing permissions
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_group, permission, add_deny FROM upgrade_smf_permissions INTO OUTFILE '/temp/temp_smf_permissions.txt'"
# =============================================================================
echo Processing personal_messages
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_pm, id_pm_head, id_member_from, deleted_by_sender, from_name, msgtime, subject, body FROM upgrade_smf_personal_messages INTO OUTFILE '/temp/temp_smf_personal_messages.txt'"
# =============================================================================
echo Processing pm_recipients
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_pm, id_member, labels, bcc, is_read, is_new, deleted FROM upgrade_smf_pm_recipients INTO OUTFILE '/temp/temp_smf_pm_recipients.txt'"
# =============================================================================
echo Processing polls
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_poll, question, voting_locked, max_votes, expire_time, hide_results, change_vote, guest_vote, num_guest_voters, reset_poll, id_member, poster_name FROM upgrade_smf_polls INTO OUTFILE '/temp/temp_smf_polls.txt'"
# =============================================================================
echo Processing poll_choices
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_poll, id_choice, label, votes FROM upgrade_smf_poll_choices INTO OUTFILE '/temp/temp_smf_poll_choices.txt'"
# =============================================================================
echo Processing sessions
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT session_id, last_update, data FROM upgrade_smf_sessions INTO OUTFILE '/temp/temp_smf_sessions.txt'"
# =============================================================================
# echo Processing smileys
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_smiley, code, filename, description, smiley_row, smiley_order, hidden FROM upgrade_smf_smileys INTO OUTFILE '/temp/temp_smf_smileys.txt'"
# =============================================================================
echo Processing topics
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT id_topic, is_sticky, id_board, id_first_msg, id_last_msg, id_member_started, id_member_updated, id_poll, id_previous_board, id_previous_topic, num_replies, num_views, locked, unapproved_posts, approved FROM upgrade_smf_topics INTO OUTFILE '/temp/temp_smf_topics.txt'"
# =============================================================================
echo Processing settings
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "SELECT variable, value FROM upgrade_smf_settings INTO OUTFILE '/temp/temp_smf_settings.txt'"
# =============================================================================
echo Done
--- End code ---

Then imported the data into the new clean database with this script:


--- Code: ---echo Processing attachments
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_attachments"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_attachments.txt' INTO TABLE smf_attachments FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_attach, id_thumb, id_msg, id_member, id_folder, attachment_type, filename, file_hash, fileext, size, downloads, width, height, approved);"
# =============================================================================
echo Processing ban_groups
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_ban_groups"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_ban_groups.txt' INTO TABLE smf_ban_groups FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_ban_group, name, ban_time, expire_time, cannot_access, cannot_register, cannot_post, cannot_login, reason, notes);"
# =============================================================================
echo Processing ban_items
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_ban_items"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_ban_items.txt' INTO TABLE smf_ban_items FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_ban, id_ban_group, ip_low1, ip_high1, ip_low2, ip_high2, ip_low3, ip_high3, ip_low4, ip_high4, hostname, email_address, id_member, hits);"
# =============================================================================
echo Processing boards
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_boards"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_boards.txt' INTO TABLE smf_boards FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_board, id_cat, child_level, id_parent, board_order, id_last_msg, id_msg_updated, member_groups, id_profile, name, description, num_topics, num_posts, count_posts, id_theme, override_theme, unapproved_posts, unapproved_topics, redirect);"
# =============================================================================
echo Processing categories
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_categories"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_categories.txt' INTO TABLE smf_categories FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_cat, cat_order, name, can_collapse);"
# =============================================================================
echo Processing collapsed_categories
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_collapsed_categories"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_collapsed_categories.txt' INTO TABLE smf_collapsed_categories FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_cat, id_member);"
# =============================================================================
echo Processing membergroups
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_membergroups"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_membergroups.txt' INTO TABLE smf_membergroups FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_group, group_name, description, online_color, min_posts, max_messages, stars, group_type, hidden, id_parent);"
# =============================================================================
echo Processing members
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_members"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_members.txt' INTO TABLE smf_members FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_member, member_name, date_registered, posts, id_group, lngfile, last_login, real_name, instant_messages, unread_messages, new_pm, buddy_list, pm_ignore_list, pm_prefs, mod_prefs, message_labels, passwd, openid_uri, email_address, personal_text, gender, birthdate, website_title, website_url, location, icq, aim, yim, msn, hide_email, show_online, time_format, signature, time_offset, avatar, pm_email_notify, karma_bad, karma_good, usertitle, notify_announcements, notify_regularity, notify_send_body, notify_types, member_ip, member_ip2, secret_question, secret_answer, id_theme, is_activated, validation_code, id_msg_last_visit, additional_groups, smiley_set, id_post_group, total_time_logged_in, password_salt, ignore_boards, warning, passwd_flood, pm_receive_from);"
# =============================================================================
echo Processing messages
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_messages"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_messages.txt' INTO TABLE smf_messages FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_msg, id_topic, id_board, poster_time, id_member, id_msg_modified, subject, poster_name, poster_email, poster_ip, smileys_enabled, modified_time, modified_name, body, icon, approved);"
# =============================================================================
echo Processing message_icons
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_message_icons"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_message_icons.txt' INTO TABLE smf_message_icons FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_icon, title, filename, id_board, icon_order);"
# =============================================================================
echo Processing moderators
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_moderators"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_moderators.txt' INTO TABLE smf_moderators FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_board, id_member);"
# =============================================================================
echo Processing permissions
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_permissions"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_permissions.txt' INTO TABLE smf_permissions FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_group, permission, add_deny);"
# =============================================================================
echo Processing personal_messages
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_personal_messages"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_personal_messages.txt' INTO TABLE smf_personal_messages FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_pm, id_pm_head, id_member_from, deleted_by_sender, from_name, msgtime, subject, body);"
# =============================================================================
echo Processing pm_recipients
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_pm_recipients"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_pm_recipients.txt' INTO TABLE smf_pm_recipients FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_pm, id_member, labels, bcc, is_read, is_new, deleted);"
# =============================================================================
echo Processing polls
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_polls"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_polls.txt' INTO TABLE smf_polls FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_poll, question, voting_locked, max_votes, expire_time, hide_results, change_vote, guest_vote, num_guest_voters, reset_poll, id_member, poster_name);"
# =============================================================================
echo Processing poll_choices
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_poll_choices"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_poll_choices.txt' INTO TABLE smf_poll_choices FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_poll, id_choice, label, votes);"
# =============================================================================
echo Processing sessions
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_sessions"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_sessions.txt' INTO TABLE smf_sessions FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (session_id, last_update, data);"
# =============================================================================
echo Processing smileys
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_smileys"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_smileys.txt' INTO TABLE smf_smileys FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_smiley, code, filename, description, smiley_row, smiley_order, hidden);"
# =============================================================================
echo Processing topics
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_topics"
mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_topics.txt' INTO TABLE smf_topics FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (id_topic, is_sticky, id_board, id_first_msg, id_last_msg, id_member_started, id_member_updated, id_poll, id_previous_board, id_previous_topic, num_replies, num_views, locked, unapproved_posts, approved);"
# =============================================================================
# echo Processing settings
# DON'T REMOVE THE SETTINGS: mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "TRUNCATE TABLE smf_settings"
# mysql -u [YOURUSERNAME] -p[YOURPASSWORD] -D [YOURDATABASE] -e "LOAD DATA LOCAL INFILE '/temp/temp_smf_settings.txt' INTO TABLE smf_settings FIELDS TERMINATED BY '\t' LINES TERMINATED BY '\n' (variable, value);"
# =============================================================================
echo Done
--- End code ---

Just an FYI, you will still need to go in and check the permissions for each member group in the admin section.

And that should do it for you!

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version