MyBB Community Forums

Full Version: Export a subforum and merge into another forum?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am looking to export a MyBB Subforum's threads and posts and merge them into another MyBB Forum. Is this possible to do with the MyBB Merge System or would I need to write a custom exporter/importer script to accomplish this?
The merge system was designed to import a whole forum to another.

When merging a single subforum (with threads and posts) from one source to another forum, you must absolutely take care of ID's:
- Forum ID (fid)
- Thread ID (tid)
- Post ID (pid))
- User ID (uid)
- Username
These values must be unique!

- So I would recommend to export the tables for threads and posts from the subformus source without fields "tid", "pid", "uid" and manually set the value for Forum ID (fid) to what the destination fid will be and uid for the user.
- After that import the export file into destination database. This way you can let the destination database set new auto-increment values for "tid" and "pid" to have unique ID values.
- After that do a Cahche Refresh and Recount in ACP to update all imported thread/posts.

[ExiTuS]
The Merge System will take care of such IDs, since its job is merging.

What OP should pay attention should be how to limit source queries on particular forums and threads/posts in them. Doing some scripting of restricting forum IDs to a limited numbers would be better to manually setting up an intermediate forum.

So, an easier method but requiring more database operations is:
  • Backup the source forum's database.
  • Restore the backup into a new forum.
  • In the new forum, manually delete all the threads/posts in unwanted forums and then delete all these forums.
  • Import remaining data into the target forum using the Merge System.