MyBB Community Forums

Full Version: Import a forum with threads and posts from a database to my new one?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Basically I've an old database backup and I accidentally deleted a mybb section with 23 threads and couple thousand replies and I don't want to use the merge system as that will merge all the accounts again which I already have. If I have the database already on my phpmyadmin how do I go around and take out that mybb section and go to my new database and import the file and the section gets imported back? will that work?
I don't know if i am understanding this correctly but in your phpMyAdmin just delete the tables you don't want and then do an import
of the old tables you want or instead of an import you can run a sql
For instance i want to use my old mytrb_forums so i would delete the new mytrb_forums table and do a an import using my old backup
or just Run SQL

Somthing like this :

CREATE TABLE IF NOT EXISTS `mytrb_forums` (
  `fid` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(120) NOT NULL DEFAULT '',
  `description` text NOT NULL,
  `linkto` varchar(180) NOT NULL DEFAULT '',
  `type` char(1) NOT NULL DEFAULT '',
  `pid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `parentlist` text NOT NULL,
  `disporder` smallint(5) unsigned NOT NULL DEFAULT '0',
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `open` tinyint(1) NOT NULL DEFAULT '0',
  `threads` int(10) unsigned NOT NULL DEFAULT '0',
  `posts` int(10) unsigned NOT NULL DEFAULT '0',
  `lastpost` int(10) unsigned NOT NULL DEFAULT '0',
  `lastposter` varchar(120) NOT NULL DEFAULT '',
  `lastposteruid` int(10) unsigned NOT NULL DEFAULT '0',
  `lastposttid` int(10) unsigned NOT NULL DEFAULT '0',
  `lastpostsubject` varchar(120) NOT NULL DEFAULT '',
  `allowhtml` tinyint(1) NOT NULL DEFAULT '0',
  `allowmycode` tinyint(1) NOT NULL DEFAULT '0',
  `allowsmilies` tinyint(1) NOT NULL DEFAULT '0',
  `allowimgcode` tinyint(1) NOT NULL DEFAULT '0',
  `allowvideocode` tinyint(1) NOT NULL DEFAULT '0',
  `allowpicons` tinyint(1) NOT NULL DEFAULT '0',
  `allowtratings` tinyint(1) NOT NULL DEFAULT '0',
  `usepostcounts` tinyint(1) NOT NULL DEFAULT '0',
  `usethreadcounts` tinyint(1) NOT NULL DEFAULT '0',
  `requireprefix` tinyint(1) NOT NULL DEFAULT '0',
  `password` varchar(50) NOT NULL DEFAULT '',
  `showinjump` tinyint(1) NOT NULL DEFAULT '0',
  `style` smallint(5) unsigned NOT NULL DEFAULT '0',
  `overridestyle` tinyint(1) NOT NULL DEFAULT '0',
  `rulestype` tinyint(1) NOT NULL DEFAULT '0',
  `rulestitle` varchar(200) NOT NULL DEFAULT '',
  `rules` text NOT NULL,
  `unapprovedthreads` int(10) unsigned NOT NULL DEFAULT '0',
  `unapprovedposts` int(10) unsigned NOT NULL DEFAULT '0',
  `deletedthreads` int(10) unsigned NOT NULL DEFAULT '0',
  `deletedposts` int(10) unsigned NOT NULL DEFAULT '0',
  `defaultdatecut` smallint(4) unsigned NOT NULL DEFAULT '0',
  `defaultsortby` varchar(10) NOT NULL DEFAULT '',
  `defaultsortorder` varchar(4) NOT NULL DEFAULT '',
  PRIMARY KEY (`fid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=28 ;

--
-- Dumping data for table `mytrb_forums`
--

INSERT INTO `mytrb_forums` (`fid`, `name`, `description`, `linkto`, `type`, `pid`, `parentlist`, `disporder`, `active`, `open`, `threads`, `posts`, `lastpost`, `lastposter`, `lastposteruid`, `lastposttid`, `lastpostsubject`, `allowhtml`, `allowmycode`, `allowsmilies`, `allowimgcode`, `allowvideocode`, `allowpicons`, `allowtratings`, `usepostcounts`, `usethreadcounts`, `requireprefix`, `password`, `showinjump`, `style`, `overridestyle`, `rulestype`, `rulestitle`, `rules`, `unapprovedthreads`, `unapprovedposts`, `deletedthreads`, `deletedposts`, `defaultdatecut`, `defaultsortby`, `defaultsortorder`) VALUES
(1, 'Welcome To The Support Forums', '', '', 'c', 0, '1', 1, 1, 0, 0, 0, 0, '0', 0, 0, '', 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, '', 1, 0, 0, 0, '', '', 0, 0, 0, 0, 0, '', ''),
(2, 'Member Introductions', 'New here? Come in and introduce yourself to the fellow members of the forum.', '', 'f', 1, '1,2', 1, 1, 1, 0, 0, 0, '0', 0, 0, '', 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, '', 1, 0, 0, 0, '', '', 0, 0, 0, 0, 0, '', ''),