Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
2 registered members (mmkk, JAISP), 64 guests, and 377 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
TGCsanderson
TGCsanderson
Hackelton U.K.
Posts: 67
Joined: September 2007
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 12
M4TT 9
Ruben 8
mmkk 4
FREAK 3
isaac 3
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
How to merge two databases #250400
09/26/12 02:37 PM
09/26/12 02:37 PM
Joined: Oct 2007
Posts: 215
Baldeagle Offline OP
enthusiast
Baldeagle  Offline OP
enthusiast
Joined: Oct 2007
Posts: 215
I have a bit of a sticky wicket. I'm setting up a new server for Stovebolt.com. We're running ubbthreads on our server. While I was setting up the server, the hosting company added our dns records to their dns servers. I was unaware of this, and in preparing for the move, I had added their servers as backup DNS (thinking they would simply redirect if the query wasn't cached and adding them would help dns "catch up" quicker.)

So, for reasons that still remain unclear to me (because the two primary servers were at the old hosting company and working fine), some of our users went to the new server. Some of those logged in to the forum and posted.

So now I have posts on each server that don't exist on the other server. (I don't think I'll have any new users, because I never approved any.) The new server is now setup so they can no longer get to it, and the new hosting company's dns servers have been removed from our domain registrar's records. So everything is back to normal except this one problem.

I could just import the database from the old server when I do the cutover, but it would be nice if I could preserve the posts that were made on the new server.

I suspect there will be some post number clashes, so this may not be possible. Is there a way to merge the two servers so I don't lose any of the posts?

This article suggests a way, but I'd like to have some certainty that it will work before trying it.


The Stovebolt Geek
http://www.stovebolt.com/ubbthreads/ubbthreads.php

UBBThreads 7.6.0
Web Server Apache/2.4.25
PHP Version 5.6.30
MySQL Version 5.5.55-log
Database Size 1.95 GB
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: How to merge two databases [Re: Baldeagle] #250401
09/26/12 02:50 PM
09/26/12 02:50 PM
Joined: Dec 2003
Posts: 5,827
Lutz,FL
Ruben Offline

Ruben  Offline


Joined: Dec 2003
Posts: 5,827
Lutz,FL
This is over my head and some of the guru's will need to respond.
But I would assume it is not worth the effort.
Due to you would need to also update post counts by user, Which I believe are in several tables. So I guess it is how important the posts are. And how many of them exist.


Blue Man Group


There is no such thing as stupid questions. Just stupid answers
Re: How to merge two databases [Re: Baldeagle] #250402
09/26/12 03:17 PM
09/26/12 03:17 PM
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
Gizmo Offline
UBB.threads Developer
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,788
Portland, OR; USA
I've been pushing for a UBB.threads Self Importer; whereby one could import threads from another install. Nothing ever came of light for this, and unfortunately that'd be what you'd need to be able to accomplish the task you're wanting.

All in all, it's really going to end up not being worth the effort to preserve a couple of days worth of activity.


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: How to merge two databases [Re: Baldeagle] #250412
09/27/12 03:31 PM
09/27/12 03:31 PM
Joined: Jun 2004
Posts: 220
Seattle, WA
C
cascadeclimbers Offline

enthusiast
cascadeclimbers  Offline

enthusiast
C
Joined: Jun 2004
Posts: 220
Seattle, WA
If you imported the post and thread tables as temp into your database you could potentially turn off your board and run a couple of insert subqueries that would copy the posts and threads and increment their IDs accordingly. You'd have to figure out the math so that the thread and post ID were changed correctly. The only conflict might be that I think posts are sorted by post_id and not post date in flat mode, so you might have a bit of wonkiness with post timeline for those threads.


Won't you take me to Funkytown?

Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Users Unable to Upload Avatar [Not a Bug]
by M4TT. 12/13/17 08:51 AM
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
Forum Statistics
Forums36
Topics35,015
Posts190,544
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)