vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Copying Data from one forum to another (https://vborg.vbsupport.ru/showthread.php?t=293573)

conaero 01-04-2013 11:21 AM

Copying Data from one forum to another
 
Hi All,

We're currently involved in migrating one forum to another existing (but empty) forum. The source forum is messy and cluttered with useless plugins etc and the destination is clean and fully setup.

We'd like to copy the user, post and thread data over to the new forum without breaking anything.

I'd like to know which database tables do I need to copy over to get all of this data in so that the users see a transparent transition?

Any ideas?

Kind Regards - Trev

squidsk 01-04-2013 05:13 PM

Quote:

Originally Posted by conaero (Post 2394636)
Hi All,

We're currently involved in migrating one forum to another existing (but empty) forum. The source forum is messy and cluttered with useless plugins etc and the destination is clean and fully setup.

We'd like to copy the user, post and thread data over to the new forum without breaking anything.

I'd like to know which database tables do I need to copy over to get all of this data in so that the users see a transparent transition?

Any ideas?

Kind Regards - Trev

To figure out the table just run a show tables query on the clean db for the new forum and make a list of the tables, then take a backup of just those tables and restore them into the new db. There are however complications, if any of the plugins have modified any of those tables, and that's likely for users, usergroups and a few others depending on the plugins, the schema for the tables won't match vanilla and you'll be bringing extra data you don't need.

The best way to do it would be to use a third db, temporarily created, to store the tables exported from the original which the final db has. Then for each table in the final db run a describe <table name> query on the table then remove any extra fields from the temporary db's version of the table. Once you've done that for all tables export from the temporary db and restore it to the final db.

Brandon Sheley 01-04-2013 06:58 PM

Quote:

Originally Posted by conaero (Post 2394636)
and cluttered with useless plugins etc

This is what's going to trip you up, you'll want to remove any/all plugins before trying to copy tables over since most plugins will make new fields in your columns.

conaero 01-07-2013 07:45 AM

Thanks guys, I'll get on it :)

Kind Regards - Trev


All times are GMT. The time now is 09:26 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01150 seconds
  • Memory Usage 1,718KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete