Scenario
You have an existing forum that you would like to add to an existing group.
Warning
Running the following script will replace an existing group forum.
Solution
First you should make sure that your group has discussions enabled. Once you have done this you can run the following SQL to migrate your forum. You will need to know the SectionID of your existing forum as well as the group that you want to move the forum to. Also notice that at the bottom of the script it is resetting the indexes of the forum so that search updates the urls of the updated posts.
DECLARE @HubSectionId int, @ForumSectionId int
SET @HubSectionId = 0
SET @ForumSectionId = 0
DECLARE @HubForumSectionID int, @AppKey varchar(200)
SELECT @HubForumSectionID = SectionID FROM cs_Sections WHERE HubSectionID = @HubSectionId AND ApplicationType = 0
SELECT @AppKey = ApplicationKey FROM cs_Sections WHERE SectionID = @HubForumSectionID
DELETE FROM cs_Sections WHERE SectionID = @HubForumSectionID
UPDATE cs_Sections SET
GroupID = (SELECT GroupID FROM cs_Sections WHERE SectionID = @HubSectionID),
ApplicationKey = @AppKey,
PropertyNames = NULL,
PropertyValues = NULL,
HubSectionID = @HubSectionId
WHERE SectionID = @ForumSectionId
UPDATE cs_Posts SET IsIndexed = 0 WHERE SectionID = @ForumSectionId AND IsIndexed = 1.
After this you may need to touch your web.config.