News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

mergeSMF.php - Script to merge two SMF forums, v2.0.17

Started by shawnb61, October 06, 2020, 02:05:26 AM

Previous topic - Next topic

shawnb61

Depends on the function.  Since all messages have dates, any functions based on dates, e.g., searching, works just fine.  Old messages look old & new messages look new.

But the 'unread posts' function will be funky unless you take some special measures.

To address, I used a bonehead utility that marked the older boards as read for newer users.  From the initial post above:
Quote- smf_mark_all_read_merge.php - I used this to mark all secondary boards read by active primary board users. In my instance, the secondary forum was a predecessor to the current forum, and the content was dated.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

shawnb61

After pondering this for about a year, we finally decided to merge our two production forums using this script.

Everything went perfectly.

With minor tweaks, we were even able to merge mod-related content.  Both forums used the Download System mod (https://www.simplemachines.org/community/index.php?topic=203471.0).  So the engine was flexible and tweakable enough to help us do so. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

GL700Wing

Quote from: GL700Wing on October 20, 2020, 09:56:16 PMLooks like the SMF Admin Toolbox can no longer be downloaded from simplemachines.org - found a copy on GitHub: https://github.com/Spuds/SMF-Admin-Toolbox
The SMF Admin Toolbox is now on SMFHacks
Life doesn't have to be perfect to be wonderful ...

seekier

#23
I edited  everything as instructed but when I hit to connect it brings out this error saying table does not exist.

The first error is the attachment bellow followed by numerous error in red colour

NB: I am using the latest version of SMF on both website.
You cannot view this attachment. 

what is it l am not doing right or is this mod not Compatible with SMF 2.1.2 or this mod does not work on two forum using the same version of SMF?

shawnb61

Are both forums using the same database, with different prefixes?  Are they both working?

Quote from: shawnb61 on October 06, 2020, 02:05:26 AMInstructions:
1. Restore your two forums and get them working side-by-side on your site, both installations within the same database (just use a different database prefix like smf2_ for the SECONDARY one prior to the DB restore).
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

seekier

Quote from: shawnb61 on October 17, 2022, 02:47:07 AMAre both forums using the same database, with different prefixes?
Sorry I missed this part. I was using different database and different prefixes.

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

seekier

Quote from: shawnb61 on October 20, 2022, 12:49:21 AMI'm curious how it all turned out, @seekier !
I messed up, after Successfully  merged, my forum categories, boards and topic was ok but existing Users does not have permission to do anything even the admins.

I wiped everything out and try to restore my backup but I have lost my backup file so I am starting from scratch.

Doug Heffernan

Quote from: seekier on October 20, 2022, 10:49:43 AMI messed up, after Successfully  merged, my forum categories, boards and topic was ok but existing Users does not have permission to do anything even the admins.

Did you check the (group) permissions after the merge?

Quote from: seekier on October 20, 2022, 10:49:43 AMI wiped everything out and try to restore my backup but I have lost my backup file so I am starting from scratch.

Can you ask your host if they have a recent backup copy of your website?

seekier

Quote from: Doug Heffernan on October 20, 2022, 11:00:07 AMDid you check the (group) permissions after the merge?
I was not able to do that because even I the admin didn't have permission into admin section.

QuoteCan you ask your host if they have a recent backup copy of your website?
I did asked them but they couldn't help because their backup was not recent.

Doug Heffernan

Quote from: seekier on October 20, 2022, 12:42:58 PMI was not able to do that because even I the admin didn't have permission into admin section.

That is strange. As an admin you must have permissions everywhere and for everything. Did you get the sandard no permissions error or some other type of error?

Quote from: seekier on October 20, 2022, 12:42:58 PMI did asked them but they couldn't help because their backup was not recent.

It is much better to use an old(er) backup rather than starting from scratch, no?

seekier

Quote from: Doug Heffernan on October 20, 2022, 01:26:01 PMIt is much better to use an old(er) backup rather than starting from scratch, no?
that's right.

mrbandit

I realize this topic has been dormant for awhile, but I think this will help me with my situation.  https://www.simplemachines.org/community/index.php?topic=587525.0

I had a table crash around 2019 and lost about 15 years worth of data.  My backups were incomplete and my backup location was removed without my knowledge.  When the table crashed my webhost dropped the table trying to help and it blanked out smf_messages.  At that point all I could do was run the recount maintenance, which reset all of the topics.  All of the members, forums and themes were left intact.  The community started posting again and that was that. 

This past week I found an old backpack HDD with a backup to my forum.  It only contained the first 10 years of my forum, but that would be great to have back.  All of the users present on the forum currently were present in the backup I have.  I am comfortable with what you've stated, but I would love to preserve the backup messages to be linked to the correct active members.  Is that possible?

Thanks in advance!!!!

shawnb61

#33
Quote from: mrbandit on November 28, 2023, 11:01:00 PMI realize this topic has been dormant for awhile...
This tool has been actively maintained.  Records added in 2.1 were folded in a few months ago - effectively making this a 2.1-only utility. 

Quote from: mrbandit on November 28, 2023, 11:01:00 PMI am comfortable with what you've stated, but I would love to preserve the backup messages to be linked to the correct active members.  Is that possible?

In the past, we pointed folks to Spuds's old merge user tool via the link above.  I just checked, and it looks like that tool is no longer available. 

Without that old tool, someone would have to write a new one, one that hopefully also folds in the new 2.1 tables. 

EDIT:  I cannot update the initial post - so consider this post the update!


4/2023, version 2.1.3:  2.1 Support.  Due to the DB changes, this is now a 2.1 only utility.  Records added include user_likes, pm_labels, user_alerts_prefs, & pm_labeled_messages. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Diego Andrés


SMF Tricks - Free & Premium Responsive Themes for SMF.

shawnb61

Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

mrbandit

I've restored the old forum at 1.1.19, and I'm going to attempt a 2.0.18 upgrade, which is where the current 2 yr old forum is located.  I'll create another forum within the restored database and see if I can get a copy of the current forum operational. 

If it would be better I can upgrade them both to 2.1.x

Advertisement: